JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the ColorDialog Class

As discussed in the In Depth section of this chapter, Color dialogs let the user select a color, which is returned in the dialog object's Color property. Here is the class hierarchy for Color dialog boxes:

Object
   MarshalByRefObject
      Component
         CommonDialog
            ColorDialog

You can find the notable public properties of ColorDialog objects in Table 9.18, the notable public methods in Table 9.19, and the notable public events in Table 9.20.

Table 9.18: Noteworthy public properties of ColorDialog objects.

Property

Means

AllowFullOpen

Gets/sets whether the user can use the dialog box to define custom colors.

AnyColor

Gets/sets whether the dialog box displays all available colors in the set of basic colors.

Color

Gets/sets the color selected by the user.

CustomColors

Gets/sets the set of custom colors shown in the dialog box.

FullOpen

Gets/sets whether the controls used to create custom colors are visible when the dialog box is opened

ShowHelp

Gets/sets whether a Help button appears in the color dialog box.

SolidColorOnly

Gets/sets whether the dialog box will restrict users to selecting solid colors only.

Table 9.19: Noteworthy public methods of ColorDialog objects.

Method

Means

Reset

Resets all dialog options to their default values.

ShowDialog

Shows the dialog.

Table 9.20: Noteworthy public events of ColorDialog objects.

Event

Means

HelpRequest

Occurs when the user clicks the Help button.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor