Difference between revisions of "Reference: MSEgui/TLabel"
From Free Pascal wiki
Jump to navigationJump to searchMichaelEbner (talk | contribs) |
m (Fixed syntax highlighting) |
||
(11 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
=TLabel= | =TLabel= | ||
− | ''' | + | ''' ready for revision''' |
TLabel shows some Text on the form. | TLabel shows some Text on the form. | ||
Line 7: | Line 7: | ||
[[Image:msegui_TLabel.png]] | [[Image:msegui_TLabel.png]] | ||
+ | ===Alternatives=== | ||
+ | |||
+ | * You can use TDispWidget successor like TStringDisp | ||
+ | * If you want display text next to a widget, you can use TFrame.Caption of this component. | ||
==Reference== | ==Reference== | ||
Line 15: | Line 19: | ||
* TPersistent | * TPersistent | ||
* TComponent | * TComponent | ||
− | * TMseComponent | + | * [[Reference:_MSEgui/TMseComponent|TMseComponent]] |
* TActComponent | * TActComponent | ||
* [[Reference:_MSEgui/TWidget|TWidget]] | * [[Reference:_MSEgui/TWidget|TWidget]] | ||
Line 46: | Line 50: | ||
[[Reference:_MSEgui/TWidget#Hint|Hint]] | [[Reference:_MSEgui/TWidget#Hint|Hint]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OptionsWidget|OptionsWidget]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OptionsWidget1|OptionsWidget1]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#PopupMenu|PopupMenu]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#TabOrder|TabOrder]] | ||
[[Reference:_MSEgui/TWidget#Enabled|Visible]] | [[Reference:_MSEgui/TWidget#Enabled|Visible]] | ||
Line 53: | Line 65: | ||
The Caption is the text the label displays. | The Caption is the text the label displays. | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
{$ifdef mse_unicodestring} | {$ifdef mse_unicodestring} | ||
msestring = unicodestring; | msestring = unicodestring; | ||
Line 67: | Line 79: | ||
With the option lao_nogray you can prevent a label to be shown grayed if itself or a parent widget is disabled. | With the option lao_nogray you can prevent a label to be shown grayed if itself or a parent widget is disabled. | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
labeloptionty = (lao_nogray,lao_nounderline); | labeloptionty = (lao_nogray,lao_nounderline); | ||
labeloptionsty = set of labeloptionty; | labeloptionsty = set of labeloptionty; | ||
Line 74: | Line 86: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | If you use a & char in a caption, the following char gets | + | If you use a & char in a caption, the following char gets underlined. To prevent this use lao_nounderline: |
[[Image:msegui_label_options.png]] | [[Image:msegui_label_options.png]] | ||
+ | |||
+ | |||
+ | ====TextFlags==== | ||
+ | |||
+ | With TextFlags you can specify things like alignment or rotation. See the following image and the image at [[Reference:_MSEgui/TFrame#Caption|CaptionTextFlags]] | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | textflagty = (tf_xcentered, tf_right, tf_xjustify, tf_ycentered, tf_bottom, | ||
+ | tf_rotate90, tf_rotate180, | ||
+ | tf_clipi, tf_clipo, | ||
+ | tf_grayed, tf_wordbreak, tf_softhyphen, | ||
+ | tf_noselect, tf_underlineselect, | ||
+ | tf_ellipseleft, tf_ellipseright, | ||
+ | tf_tabtospace, tf_showtabs, | ||
+ | tf_force); | ||
+ | textflagsty = set of textflagty; | ||
+ | |||
+ | property TextFlags: textflagsty default defaultlabeltextflags; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | [[Image:msegui_label_textflags.png]] | ||
===Methods=== | ===Methods=== | ||
Line 82: | Line 115: | ||
=== Events=== | === Events=== | ||
− | ==== | + | ====Inherited from TWidget==== |
[[Reference:_MSEgui/TWidget#OnHint|OnHint]] | [[Reference:_MSEgui/TWidget#OnHint|OnHint]] | ||
[[Reference:_MSEgui/TWidget#OnEnter, OnFocus, OnActivate|OnEnter, OnFocus, OnActivate]] | [[Reference:_MSEgui/TWidget#OnEnter, OnFocus, OnActivate|OnEnter, OnFocus, OnActivate]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OnNavigRequest|OnNavigRequest]] | ||
[[Reference:_MSEgui/TWidget#OnPopup|OnPopup]] | [[Reference:_MSEgui/TWidget#OnPopup|OnPopup]] | ||
− | == | + | [[Reference:_MSEgui/TWidget#OnPaint.2C_OnPaintBackground.2C_OnAfterPaint.2C_OnPaintBackground|OnPaint, OnPaintBackground, OnAfterPaint, OnPaintBackground]] |
+ | |||
+ | Inherited from TMseComponent: [[Reference:_MSEgui/TMseComponent#OnBeforeUpdateSkin.2C_OnAfterUpdateSkin|OnBeforeUpdateSkin, OnAfterUpdateSkin]] | ||
+ | |||
+ | ==Known issues== | ||
− | === | + | ===Issues of the class=== |
− | === | + | ===Issues of this documentation=== |
Feel free to add your points here. | Feel free to add your points here. |
Latest revision as of 08:33, 25 February 2020
TLabel
ready for revision
TLabel shows some Text on the form.
Alternatives
- You can use TDispWidget successor like TStringDisp
- If you want display text next to a widget, you can use TFrame.Caption of this component.
Reference
Hierarchy
- TObject
- TPersistent
- TComponent
- TMseComponent
- TActComponent
- TWidget
- TActionWidget
- TActionPublishedWidgetNwr
- TPublishedWidgetNwr
- TPublishedWidget
- TCustomLabel
- TLabel
Properties
inherited from TWidget
Caption
The Caption is the text the label displays.
{$ifdef mse_unicodestring}
msestring = unicodestring;
{$else}
msestring = widestring;
{$endif}
property caption: msestring;
Options
With the option lao_nogray you can prevent a label to be shown grayed if itself or a parent widget is disabled.
labeloptionty = (lao_nogray,lao_nounderline);
labeloptionsty = set of labeloptionty;
property Options: labeloptionsty default [];
If you use a & char in a caption, the following char gets underlined. To prevent this use lao_nounderline:
TextFlags
With TextFlags you can specify things like alignment or rotation. See the following image and the image at CaptionTextFlags
textflagty = (tf_xcentered, tf_right, tf_xjustify, tf_ycentered, tf_bottom,
tf_rotate90, tf_rotate180,
tf_clipi, tf_clipo,
tf_grayed, tf_wordbreak, tf_softhyphen,
tf_noselect, tf_underlineselect,
tf_ellipseleft, tf_ellipseright,
tf_tabtospace, tf_showtabs,
tf_force);
textflagsty = set of textflagty;
property TextFlags: textflagsty default defaultlabeltextflags;
Methods
Events
Inherited from TWidget
OnPaint, OnPaintBackground, OnAfterPaint, OnPaintBackground
Inherited from TMseComponent: OnBeforeUpdateSkin, OnAfterUpdateSkin
Known issues
Issues of the class
Issues of this documentation
Feel free to add your points here.