| The title and background color can be changed from the dialog box attribute dialog. To get this dialog double click on the title bar of the box you are creating. Here I renamed the dialog MyDialog and selected BorDlg_Gray for my background | |
| You will now see the editor as it appears here |
In this section we will look at some of the tools most frequently used to create dialogs.
| Button Tool | Text Edit Box | Static Text | Group Box | ||||
| List Box | |
Sequence Visits | Choice Box | Radio Button | |||
| Alignment of Items | |||||||
A click on the button tool allows the user to create a new button then position the button on the face of the dialog box. When the button is in the desired position, click the left button to fix location. Double clicking button allows the user to change the name on the button face and assign an identifier name to the button.
Text edit subwindow is used for entering a line of text. Click on the tool, move into position and click to locate. The window can be resized by placing the cursor over and edge and pulling the edge.
| Resize cursor | |
| Make sure to select autoscroll in the horizontal choice box, and create a new Control Id |
Place static text, then double click on the text box and enter the text you wish to display.
The standard group box (button with dot/line combinations) allows the user to select an upper-left position and drag to the lower-right corner. The result is a sunken looking area.
| The button with the ok in it is actually a button, but you may click on it and select the group box option from its dialog. Make sure to change IDC_PUSHBUTTON1 to -1 since we will only use this button as a graphic item. |
|
List boxes can be placed any where within the dialog box and resized to any needed shape.
This button allows you to choose the sequence in which buttons will be visited if the user tabs between buttons.
This creates a choice box and allows the user to position it.
Radio buttons are used to get one choice from amoung a set of choices, so they are normally created as a set. To create the set, create and position one button, then select duplicate from the Edit menu and indicate how many to create and the number of columns and rows of buttons you wish. These buttons will then be linked. It is the only way to create linked buttons, so be sure you know how many buttons you will need from the start.
If you want to align a set of items, select all of these items the chose the alignment you wish.