Class Fox::FXLabel
In: rdoc-sources/FXLabel.rb
Parent: FXFrame

A label widget can be used to place a text and/or icon for explanation purposes. The text label may have an optional tooltip and/or help string. Icon and label are placed relative to the widget using the justfication options, and relative to each other as determined by the icon relationship options. A large number of arrangements is possible.

Justification modes

JUSTIFY_NORMAL:Default justification is centered text
JUSTIFY_CENTER_X:Text is centered horizontally
JUSTIFY_LEFT:Text is left-justified
JUSTIFY_RIGHT:Text is right-justified
JUSTIFY_HZ_APART:Combination of JUSTIFY_LEFT & JUSTIFY_RIGHT
JUSTIFY_CENTER_Y:Text is centered vertically
JUSTIFY_TOP:Text is aligned with label top
JUSTIFY_BOTTOM:Text is aligned with label bottom
JUSTIFY_VT_APART:Combination of JUSTIFY_TOP & JUSTIFY_BOTTOM

Relationship options for icon-labels

ICON_UNDER_TEXT:Icon appears under text
ICON_AFTER_TEXT:Icon appears after text (to its right)
ICON_BEFORE_TEXT:Icon appears before text (to its left)
ICON_ABOVE_TEXT:Icon appears above text
ICON_BELOW_TEXT:Icon appears below text
TEXT_OVER_ICON:Same as ICON_UNDER_TEXT
TEXT_AFTER_ICON:Same as ICON_BEFORE_TEXT
TEXT_BEFORE_ICON:Same as ICON_AFTER_TEXT
TEXT_ABOVE_ICON:Same as ICON_BELOW_TEXT
TEXT_BELOW_ICON:Same as ICON_ABOVE_TEXT

Normal way to show label

LABEL_NORMAL:Same as JUSTIFY_NORMAL|ICON_BEFORE_TEXT

Methods

new   to_s  

Attributes

font  [RW]  The text font [FXFont]
helpText  [RW]  Status line help text [String]
icon  [RW]  The icon for this label [FXIcon]
iconPosition  [RW]  Icon position [Integer]
justify  [RW]  Text justification mode [Integer]
text  [RW]  The text for this label [String]
textColor  [RW]  The text color [FXColor]
tipText  [RW]  Tool tip message [String]

Public Class methods

Public Instance methods

Return the label‘s text

[Validate]