PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
General Development Environment Tips
Selecting An Object
The easiest way is to just click on an object. If you are like me and not always too steady on the mouse you can hold the control key while clicking to tell PB you do not want it to move the control when you click on it. You can also use control key to select multiple objects.

Next up is the lasso, you can click hold and drag a lasso around the objects you want to select.

You can also press the tab key to cycle around all objects even if they have no tab order! If the objects are hidden by other objects you can watch the micro help to see what object has been selected when you tabbed.

There are also various key strokes you can use. If you select an object and want to select all objects below, to the right or in any direction from the object you can press control and an arrow key for the direction you want to select in. Control A always selects all objects.

Lastly in the window painter only, you can select from the edit menu the control list menu item. This will list all controls on the window and allow you to double click the object name to select it in the painter.

Layering a Groupbox
When painting up a window with some objects and a group box you can quite often find all of your objects disappear behind the group box and it can be infuriating to get them back on top of the group box. The easiest way to restore your window to its full glory is to think of the screen in 3D and select the object that you want on top of the pile first, then hold control and click on the next highest. Keep doing this until every object apart from the group box is selected. Lastly select the group box. Then from the edit menu select send to back.

Resizing Controls
There are numerous ways to resize a control. The most used ways is to Click on the control then move to the edge of the control, click and drag to resize the control. For fine adjustments you can watch the micro help for the PowerBuilder units. You can also Resize controls based on the size of other controls on the same window by using the edit size controls menu item.

You can select a control or group of controls then hold down shift and press the arrow keys to alter the size in one pixel increments. Very useful for fine adjustments In PB2 and now back in PB5 you can go to the properties of the control and directly modify the size as well as the X,Y coordinates of the control.

Special Keys
When you are declaring a function definition you can use Control and Insert or Control and Delete to insert and remove arguments repetitively.

This is really a windows tip but I find it especially useful in PowerBuilder when I have multiple sheets open and I want to quickly flip between them. If you press Control and Tab you will cycle through all open sheets in an MDI frame.

A new feature of the PB5 editor is the ability to alter the indentation of a block of code. Highlight a block of code in the usual manner, then press Tab or Shift-Tab or increase or decrease the indentation of the block.

In the window painter, you can use Copy and Paste to make a copy of a control. There is a shortcut for this action, Control-T will clone a control.

When you are in the script painter you can use Control and the number of the DropDown List box you would like to use numbered from left to right across the top of the script painter. Pressing the key will activate the drop down, you can then use the arrow keys, or type the first letter of the event you want to swap to or the item you want to paste.

When editing script in the script painter you can use Control-D to from the cursor to the end of the current line.

Structure Resequencing
When you have defined a structure in the structure painter you sometimes want to reorder the sequence of the items. You can do this be dragging and dropping the small Grey square to the left of the structure item.

Drag and Drop Editing
Just like in a word processor a new feature from PB5 onwards in the editor is the ability to drag and drop blocks of code. Highlight a block of code in the usual manner, then drag the script to the new location. When you are dragging your block of code, hold down Control to make a copy of the highlighted block.

 

Top of Page

Legal Notice

Ken Howe 2011