class PtLabel PtBasic { accel_key; // string (Pt_ARG_ACCEL_KEY) balloon_color; // color (Pt_ARG_BALLOON_COLOR) balloon_fill_color; // color (Pt_ARG_BALLOON_FILL_COLOR) balloon_position; // short (Pt_ARG_BALLOON_POSITION) horizontal_alignment; // unsigned char (Pt_ARG_HORIZONTAL_ALIGNMENT) label_data; // PhImage (Pt_ARG_LABEL_DATA) label_flags; // flag (Pt_ARG_LABEL_FLAGS) label_type; // char (Pt_ARG_LABEL_TYPE) line_spacing; // unsigned short (Pt_ARG_LINE_SPACING) margin_bottom; // unsigned short (Pt_ARG_MARGIN_BOTTOM) margin_left; // unsigned short (Pt_ARG_MARGIN_LEFT) margin_right; // unsigned short (Pt_ARG_MARGIN_RIGHT) margin_top; // unsigned short (Pt_ARG_MARGIN_TOP) select_shift; // unsigned short (Pt_ARG_SELECT_SHIFT) text_font; // string (Pt_ARG_TEXT_FONT) text_string; // string (Pt_ARG_TEXT_STRING) underline1; // color (Pt_ARG_UNDERLINE1) underline2; // color (Pt_ARG_UNDERLINE2) underline_type; // unsigned short (Pt_ARG_UNDERLINE_TYPE) vertical_alignment; // unsigned char (Pt_ARG_VERTICAL_ALIGNMENT) }
This widget is a label that can hold text, bitmaps, or images, and has an optional pop-up text balloon. Labels can be used to identify widgets and data entry fields, make icons, or put pictures into your applications.
For detailed information, please refer to PtLabel in the Photon documentation. |
A string specifying a character to use as an accelerator key or hot key.
A number specifying the color for pop-up balloon text. Default is 0x0 (black).
A number specifying the color for the pop-up balloon background. Default is 0xfeffb1 (yellow).
This instance variable specifies the position of the pop-up balloon, and may have one of the following values:
Constant | Description |
---|---|
Pt_BALLOON_RIGHT | Right |
Pt_BALLOON_LEFT | Left |
Pt_BALLOON_TOP | Top |
Pt_BALLOON_BOTTOM | Bottom |
Pt_BALLOON_INPLACE | In Place |
This instance variable specifies the horizontal alignment of the label text, and may have one of the following values:
Constant | Description |
---|---|
Pt_RIGHT | Align the label text to the right. |
Pt_LEFT | Align the label text to the left. |
Pt_CENTER | Center the label text horizontally. |
A PhImage displayed by the label if the label_type is set to Pt_IMAGE.
This instance variable controls the appearance and behavior of the widget, and may be a combination of zero or more of the following flags:
Constant | Description |
---|---|
Pt_LABEL_SELECT_SHIFT | Cause the content of the widget to shift down and right when the widget is selected. |
Pt_SHOW_BALLOON | Cause balloon help to pop up on the widget if the cursor is left stationary over the widget for 1.25 seconds. |
Pt_BALLOON_AS_REQUIRED | Only show balloon help if it is different from the visible content of the widget. |
Pt_BACKFILL_TEXT | Cause the widget to fill the text rectangle with the background color before rendering the text. |
Pt_BALLOON_REGISTERED | Internal informational bit. |
This instance variable specifies the type of label, and may have one of the following values:
Constant | Description |
---|---|
Pt_Z_STRING | Display text using the text_string variable. |
Pt_BITMAP | Bitmap |
Pt_IMAGE | Display a PhImage using the label_data variable. |
Pt_TEXT_IMAGE | Display text and an image, positioned by the balloon_position variable. |
A number of pixels to put between lines of text for extra space.
A number of pixels on the bottom, left, right, and top between the text and the edge of the label for margins.
This instance variable is deprecated. Set the Pt_LABEL_SELECT_SHIFT flag in label_flags instead.
A string specifying the font used for label text.
The string used for the label text string if the label_type is set to Pt_Z_STRING or Pt_TEXT_IMAGE.
A number specifying the color for the first underline. Default is 0x0 (black).
A number specifying the color for the second underline, which is just below the first underline. Making the two the same color creates a thick underline. Default is 0xffffffff (transparent).
A constant that specifies the type of underline for the text. For single or double underlines, the underline colors are specified using underline1 and underline2 (above). Etched underlines use the colors of the widget's top_border_color and bot_border_color.
This instance variable may have one of the following values:
Constant | Description |
---|---|
Pt_NO_ULINE | Text is not underlined. |
Pt_SINGLE_ULINE | Text gets a singe underline. |
Pt_DOUBLE_ULINE | Text gets a double underline. |
Pt_ULINE_ETCHED_IN | The underline gets an 'etched-in' appearance. |
Pt_ULINE_ETCHED_OUT | The underline gets an 'etched-out' appearance. |
This instance variable determines the vertical alignment of the text string, and may have one of the following values:
Constant | Description |
---|---|
Pt_BOTTOM | Align the label text to the bottom. |
Pt_TOP | Align the label text to the top. |
Pt_CENTER | Center the label text vertically. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.