Show Color Palette.
[Visual Basic .NET] Public Function TrackPopupMenu ( _ ByRef rect As tagRECT, _ ByVal currentColor As IColor, _ ByVal orientation As Boolean, _ ByVal hParentWnd As Integer _ ) As Boolean
[C#] public bool TrackPopupMenu ( ref tagRECT rect, ref IColor currentColor, ref bool orientation, ref int hParentWnd );
Product Availability
Available with ArcGIS Desktop.
Description
The TrackPopupMenu method displays the ColorPalette dialog on the screen.
Remarks
The TrackPopupMenu method controls the display of the palette with four parameters.
- rect - defines a rectangle, a tagRect structure, in screen coordinates (pixels) that the menu will align itself with—for example, the coordinates of the button that displays the popup menu. For more information about getting the onscreen coordinates of controls, see your development environment's documentation.
- currentColor - a color object, which allows you to specify the current color. If the color exactly matches a color on the menu, that color will be displayed as selected initially. If the user cancels the palette rather than selecting a color, the read-only Color property will reflect the color passed in this parameter.
- orientation - a Boolean, which affects the orientation and location of the menu. If False, the menu will align beneath the rectangle specified; if True, the menu will appear to the right of the rectangle.