ucolorbox (ColorBox)

The ucolorbox widget displays a color value, either a color name or RGB value, in a color box in a form component. Uniface provides a logical widget called ColorBox, which is mapped to ucolorbox.

Colorbox with value lawngreen

For more information, see Specifying a Widget for a Field or Entity.

Widget Overview
Logical widget name: ColorBox
Maps to physical widget:

ucolorbox

Default definition: ColorBox=ucolorbox (font=label)
Use for: String fields in which a color can be entered and displayed
Supported triggers: See Triggers
Supported properties: See Widget Properties
Supported in egrid(Grid) widget? Yes. Some properties may not be applicable.

For more information, see egrid (Grid) and Widgets and Properties Supported in Grid Widget.

Supports MSAA? : Yes, for testing purposes only. For more information, see Accessibility.

Description

The ucolorbox widget is a single-line edit control with a small square (color box) showing the color defined in the edit control. Entering an invalid color in the edit control results in an empty color box. The widget is cleared when an empty string is assigned.

The ucolorbox widget supports the standard Uniface field colors, so the color handling is dependent on the underlying Microsoft Windows system.

When printing, only text representation is printed, not the ucolorbox itself.

The ucolorbox widget does not support Unicode.

Triggers

  • trigger detail—activated for a two-state check box if the Use Detail Trigger property is set.

    Note:  The Detail trigger can be fired only if the DblClk property is set to Detail. You can do this in the usys.ini file or in the More Properties dialog (click More in the Define Color Box Properties dialog).

  • trigger valueChanged—activated when a user enters a value.

Widget Properties

Widget Properties for ucolorbox

Property

Technical Name

Dynamic?

3-D Effect (3d)

3D

Yes

Attach to Window Border (attach)

Attach

Yes

Background Color (BackColor)

BackColor

Yes

Bottom Line (BottomLine)

BottomLine

Yes

Color Position

ColorPos

Yes

Dimmed Background Color (DimmedBackColor)

DimmedBackColor

Yes

Double-Click (DblClk)

DblClk

Yes

Foreground Color (ForeColor)

ForeColor

Yes

Frame

Frame

Yes

Label Font (LabelFont)

LabelFont

Yes

Mouse Pointer (Cursor)

Cursor

Yes

Tool Tip Text (ToolTipText)

ToolTipText

Yes

Widget Font (Font)

Font

Yes

Attach Margin (AttachMargin)

AttachMargin

Yes

Popup Rectangle (PopupRect)

PopupRect

Yes

Related Topics