
94
LESSON 8 Using standard dialogs
For example, the ColorDialog has an
AllowFullOpen property that determines whether
the user can click the dialog’s Define Custom Colors
button to show an area where the user can create
new colors. Figure 8-2 shows a
ColorDialog dis-
playing this area.
You can learn more about these extra proper-
ties by reading the online help. For example,
Microsoft’s help page for the
ColorDialog is
msdn.microsoft.com/en-us/library/system
.windows.forms.colordialog.aspx
. You can
replace colordialog in this URL with the name
of another dialog to find its web page.
Table 8-2 summarizes the
ColorDialog’s most useful properties.
TABLE 82
PROPERTY PURPOSE
AllowFullOpen
Determines whether the user can create custom colors.
Color
The selected color.
FullOpen
Determines whether the custom color area is open when the dialog appears.
Table 8-3 summarizes the FolderBrowserDialog’s most useful properties.
TABLE 83
PROPERTY PURPOSE
RootFolder
The root folder where the dialog starts browsing. This can take values such
as
Desktop, Favorites, History, and MyComputer. The Properties
window lets you pick from those values.
SelectedPath
The selected folder.
Table 8-4 summarizes the FontDialog’s most useful properties.
TABLE 84
PROPERTY PURPOSE
FixedPitchOnly
Determines if the dialog allows the user to select only fixed-width fonts. This is
useful, for example, if you are going to use the font to build ...