Page 46 - Open Soource Technologies 304.indd
P. 46
Event Driven Programming
be used only if the application requires it and care should be taken that the shapes which are
drawn do not disturb the eye.
Figure 3.7: Poorly Designed User Interface.
3.3. Button Properties for Reference
, A Command Button and labels properties
Property Description
Name The name of the object so you can call it at runtime
BackColor This specifies the command button’s background color. Click the BackColor’s pa-
lette down arrow to see a list of common Windows control colors, you must
change this to the style property from 0 - standard to 1 - graphical
Cancel Determines whether the command button gets a Click event if the user presses
escape
Caption Holds the text that appears on the command button.
Default Determines if the command button responds to an enter keypress even if another
control has the focus
Enable Determines whether the command button is active. Often, you’ll change the
enable property at runtime with code to prevent the user pressing the button
Font Produces a Font dialog box in which you can set the caption’s font name, style
and size
Height Positions the height of the object—can be used for down
Left Positions the left control—can be used for right
40 LOVELY PROFESSIONAL UNIVERSITY