Your visual part so far displays only a frame window with the title FrameWindow. In this section you will:
When you are finished this section, your application will look similar to this:

Open the MyGui part in the Visual Composition Editor
Before you start adding parts or changing the title, you need to open the part in the Visual Composition Editor. Follow these steps:
A Composition Editor view of the MyGui part opens in a separate Visual Builder window.
To change the title that appears in the frame window to something more meaningful than the default name FrameWindow, follow these steps:
Parts are added to your workspace with the parts palette. The parts palette looks like
this:

The Sticky check box at the bottom of the palette is used whenever you want to add several parts of the same type onto the canvas in succession. This saves you from having to repeatedly select a part type. To turn of sticky parts, deselect the Sticky check box.
Generally, you add parts to a canvas in three steps:
These steps will be listed again. If you accidentally add a part you did not want, you can remove it by selecting the part and pressing the Delete key.
Now you will add a list box to the left side of your window to display the names of existing users.
Add Buttons
Next, you will add five buttons:
Now change the displayed text for the five buttons to indicate their intended functions. First, turn off the Sticky checkbox. Then, hold down the Alt key, left click each button, and enter the text. Change the button text as follows, from top to bottom:
The last controls you need are two text input fields for the user's name and key, a spin button field for the user's authority level, and three static text fields describing those input fields.
Begin with the text fields. Click the Data Entry parts category
, and click the IStaticText* part type
. Turn on the Sticky check box if it is turned off. Add three
static text objects to the right of each of the topmost three push buttons. Do not worry
about exact placement yet.
Turn off the Sticky check box to stop adding static text objects.
Select each of the static text objects you just created, by holding down the Alt key and clicking mouse button 1. Change the text for the three static text objects as follows:
Add Entry Fields
Next, add a text entry field under User Name and User Key.
Click the IEntryField* part type
, turn
on the Sticky check box, and click in the space underneath each of these text objects.
Turn off the Sticky check box.
Rename the two entry fields to UserName and UserKey by clicking mouse button 2 over the object, selecting Change Name, and entering the new name in the dialog that appears (you can also do this by editing the Part name field in the Properties dialog.)
Add Spin Buttons
Add one last part, a text spin button for the authority level. Click the Buttons
category
, and the ITextSpinButton*
type
. Drop an ITextSpinButton object under the
Authority Level text. Rename the spin button to AuthorityLevel.
You need to add a set of three text choices to the spin button, and change some settings on it to make the spin button display properly:
Reader Reviewer Author
Try Your Program
The layout of your user interface is a bit messy, but it would still be nice to try out
the interface. Press Ctrl+G or the Generate Part Source
toolbar icon, to generate part source for the part. From the
File menu select the name of your configuration file so that the IDE
window is displayed (if you minimized the IDE, restore its window). Within the IDE, build
the project, then press Ctrl+Shift+R to run the project (or, from the Debug
page's Run specification view, click Run).
If you try clicking a button in the application, nothing happens, because you have not yet made connections between the buttons and actions. An example of an action related to a button would be the closing of the window when the Exit button is pressed. You will start making these connections in Part 5.
You can proceed to either of the following parts:
