Posts

Showing posts from July, 2020

Custom captions, everyone's doing it...

Image
We see custom captions all over the place, used by many software vendors. Microsoft even prefers them for their largest applications (Office, VS, Edge, etc). Why use a custom caption in your window? The simplest answer is, you get to make use of otherwise wasted real estate. With a custom caption you can add buttons, search boxes, status messages, tabs, etc., you name it. Ultimate Suite for PowerBuilder offers 3 different types of custom captions window. 1) Basic With the basic option you get the ability to add toolbar buttons to the caption. You can also add any other control you like in the window painter. The controls you add would simply overlay the caption. 2) Tabbed The tabbed caption window is extremely unique to Ultimate Suite for PowerBuilder. It allows you to have a browser like UI. This is prefect for single purpose applications (like a web browser). A perfect example of where this UI fits perfect can be found here:  https://powertothebuilder.com/NotepadPB.

Update the look of all your PowerBuilder message boxes in a few easy steps

Image
One simple way to update your PowerBuilder application is to convert all your message boxes to use the Windows 10 style PowerMessage object from Ultimate Suite for PowerBuilder: Having to change all message boxes one by one would be too time consuming. You also run the risk of missing some. Instead, what we can do is create a new, overloaded, global function that overrides the built in PowerBuilder MessageBox function. Before we do this, let's setup PowerMessage. Make sure you have the Ultimate Suite for PowerBuilder PBL's or PBD's added to your library list. Next, create a new global variable: n_cst_powermessage PowerMessage In the Open event of your main frame window, register your window with PowerMessage: PowerMessage.of_Register(THIS) PowerMessage is now setup and ready to be used. Note that at this point, if you like, you call call into PowerMessage directly to display the updated message: PowerMessage.MessageBox("Title", "Message T