Working with PowerBuilder painter layouts

PowerBuilder adopted a new overall painter layout for the IDE with the release of 7.0. (I know that was over a decade ago, and the majority of development shops should have upgraded since then, but you’d be surprised at the number of sites still using PB6.5.) The new “paned” style layouts are a vast departure from the modal property sheet dialogs that existed in 6.5 and earlier releases.

There are some subtle visual cues that were built into the panels, that many not be aware of. The first is the designation of the “active” panel. Many of the available menu selections are based upon the active panel, so it’s a good idea to get familiar with this.

Figure #1 shows the default layout for the Database Painter.

Default database painter layout

Figure 1

There are four separate “panes” in this painter, as the red numbers indicate. Only one is considered the “active” pane. Can you tell which is the active pane in the figure above? I’ll zoom into the upper right-hand corner for a better view:

Figure 2

Figure 2

Compare the small regions above the two X’s in the control menus for the two panes. The one above pane 3 (the Table properties pane) is half-grey and half-blue.  That same region in pane #2 is completely filled in, so it is the active pane, and any context menus that appear will correspond to the whichever pane is active.

Notice that some of the panes are also tabbed themselves.  The tabs cannot be moved when they appear at the top of the pane (as they do in the Table pane).  However, when they appear at the bottom of the pane, you can grab them with the mouse and redock them anywhere within the painter, making them into a separate pane.  You can also grab any pane and redock it back as a tabpage.  Any change to the layout is written into the Registry, and will be reloaded whenever you restart the painter.

As an example, one effective change to make to this default layout is to place the Results pane next to the ISQL pane – side by side. To make this change, just click on the Results tab, and drag it over to the right side of the of the pane. Figure 3 below shows that change.

Figure 3

Figure 3

Now, when you select Execute SQL… in the ISQL pane, the results appear in the Results pane, and they’re immediately visible without having to toggle between hidden panes.

Note the stickpin icons in the upper left hand of each pane. Those behave exactly as you think they would. If they’re clicked into the “stuck” position, the pane titlebar stays visible. If they’re “unstuck”, the pane titlebar will autohide itself, and reappear when the mouse hovers over it.

Once you get a painter looking the way you like it, you can name that layout and save it with an easy-to-remember name.  To save a layout, select View -> Layouts -> Manage.  This dialog window has four buttons across the top. The first one looks like “Save”, but it’s NOT! Think of that button as “Select this layout”.  If you want to save your current pane layout, click the 2nd button – New Layout.  That creates a new entry in the list, which you can give a name. This new layout definition will then appear in the View -> Layouts menu, allowing for quick layout switches.

Should you inadvertently delete the Default layout, or mangle the default to the point that it’s unrecognizable, there’s a quick shortcut for returning PowerBuilder to the factory-installed defaults.

  • Open the Windows Registry.
  • Find the registry key: HKCU\Software\Sybase\PowerBuilder\\Layout\Default.
  • Locate the value for the painter that you’re concerned with, and delete it.
  • When you restart PowerBuilder, that particular painter will be reset to the default layout (and any custom layouts you’ve defined will have been deleted as well.)



    About Paul Horan

    Software Technology - lots of experience with Sybase and IBM mobility/cloud offerings.
    This entry was posted in PowerBuilder, Software and tagged , , , . Bookmark the permalink.