com.esri.arcgis.framework
Interface IColorSelector

All Superinterfaces:
IColorBrowser, Serializable
All Known Implementing Classes:
ColorSelector

public interface IColorSelector
extends IColorBrowser, Serializable

Provides access to members that control the Color Selector Dialog.

Description

Using the IColorSelector interface and the inherited IColorBrowser interface, you can present users with the ColorSelector dialog box.

Remarks

First, you may want to specify the color that is already displayed by the dialog box when the user first sees it—you can do this by setting the read/write Color property to any color object.

The InitPopupPosition method can be used to set the initial display location of the dialog box in screen coordinates.

To display the dialog box, you should call the DoModal method. The method takes one parameter, a handle to the parent Form, which is used to ensure the dialog box displays modally. The DoModal method returns a Boolean—you should check the result to determine if the user intended to cancel the action (the result is False) or click OK (the result is True).

To determine which color was selected, simply read the Color property.

The following code displays the color selector dialog.


Product Availability

Available with ArcGIS Desktop.


Method Summary
 void initPopupPosition(int parentLeft, int parentTop, int parentRight, int parentBottom, boolean aboveParent)
          Initialize Popup Position.
 
Methods inherited from interface com.esri.arcgis.framework.IColorBrowser
doModal, getColor, setColor
 

Method Detail

initPopupPosition

void initPopupPosition(int parentLeft,
                       int parentTop,
                       int parentRight,
                       int parentBottom,
                       boolean aboveParent)
                       throws IOException,
                              AutomationException
Initialize Popup Position.

Remarks

The InitPopupPosition method can be used to set the initial display location of the dialog box in screen coordinates.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
parentLeft - The parentLeft (in)
parentTop - The parentTop (in)
parentRight - The parentRight (in)
parentBottom - The parentBottom (in)
aboveParent - The aboveParent (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.