Search Locate Previous Next Contents

Adding Controls

Use the right mouse button on the parent form to add a new control with its top left corner at that point. Many objects (such as buttons) are made at a standard size, otherwise you will find that as you move the mouse you are stretching a line (or rectangle) over the form which shows you the extent of your new object. Click again to fix the opposite corner.

When you add the object, it is given a blank caption and the properties are set to those defined in its class table. It will also be selected automatically, so you can overtype the caption and tab round to the other properties quickly.

Many objects (such as OK buttons) have a default size, so in this case you simply release the mouse to add it to your form ...


Missed! Not a big problem, however, as the new object is automatically selected. Simply ‘walk’ it to the correct spot using the cursor arrows. Then you can do the same for the Cancel button, and it might be a good idea to press Run (or hit <F5>) to check them!

Here we see that the form has a default style, no title, and the Dyalog APL icon. These are all things we shall change shortly!


Note that <OK> is set as the default button – press either <OK> or <Cancel> to close the form and continue designing.

The next stage is to add a Text edit object (for the name), a Notepad (for the address) and a Radio Button group for the eye colour. The first two are found from the Text objects submenu, and the radio buttons are listed under Selectors. You will find that for these last two you get a stretchy box (with the top corner where the mouse was) which you can pull to shape – click again to fix the size.


Here is the finished design. Several of the objects have captions, which you simply enter on the property browser as you make them. Note that there is no need to click in its caption field – this gets focus automatically when you click on an object, so that it is ready for you to start typing. You can also page up and down the objects with the <PgUp> and <PgDn> keys – the selected object is easy to spot ... it is the one with the bright blue handles!

Experiment with the various anchoring options (try sticking the OK and Cancel buttons to the right with Ctrl+R) – stretch the form to check the effect.



Continue to: Arranging and Aligning Objects
© Copyright Causeway Graphical Systems Ltd 2001