Adding some buttons

Underneath the Form in the design area is a toolbox of controls. They are divided into groups and you will have to get used to how they are organised if you are to exploit them to the full.

Why not have a look now. If you move the mouse over the icons the type of control (as named in the master library - Win32Lib) is displayed. Clicking on another of the named tabs will reveal another set of controls. For example, if you choose the "Input" tab then you get the following controls:

As well as learning what the IDE has to offer you may well have to study the Win32Lib documentation to understand fully what each type of control actually does. There are no short cuts here, but you will get a lot quicker with practice.

Now let's add a button (a "PushButton" control in Win32Lib). The control is found under the "Controls" tab and is the leftmost item. Click on the control and then move over the form in the design area and click again - ideally somewhere near where you want it to go.

A "PushButton" control appears on the design. It is automatically given the name "PushButton" with a number after it. These are assigned sequentially, so if you have just followed the tutorial that number will be "2" but if you have been doing some trying out then it will be a higher number.

As in the previous case we can move into the Property List and make changes to the values therein. This is where many novices make mistakes, so beware! When a new control is added to the design the software automatically re-focusses the display so that the Form is the selected control. Look at the Property List to check the name - it should be "MainWin".

To edit a different control you need to select it in the design. Do so now (the standard single click suffices - if you double-ckick by mistake you will be two steps ahead of yourself in the tutorial!). You can now make some changes to the detail of the control. I suggest the following:

Add another PushButton with the following properties:

To test these changes press the F6 key.

We now find that we have two ways of closing the dialogue window:

If you didn't try out the "About" button, re-launch the program (F6) and do two things:

Next we look at how to remove controls and how to save your work.