Difference between revisions of "Reference: MSEgui/TLabel"
From Free Pascal wiki
Jump to navigationJump to searchMichaelEbner (talk | contribs) (hierarchy) |
m (Fixed syntax highlighting) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=TLabel= | =TLabel= | ||
+ | |||
+ | ''' ready for revision''' | ||
+ | |||
+ | TLabel shows some Text on the form. | ||
+ | |||
+ | [[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 8: | Line 19: | ||
* TPersistent | * TPersistent | ||
* TComponent | * TComponent | ||
− | * TMseComponent | + | * [[Reference:_MSEgui/TMseComponent|TMseComponent]] |
* TActComponent | * TActComponent | ||
− | * TWidget | + | * [[Reference:_MSEgui/TWidget|TWidget]] |
* TActionWidget | * TActionWidget | ||
* TActionPublishedWidgetNwr | * TActionPublishedWidgetNwr | ||
Line 19: | Line 30: | ||
===Properties=== | ===Properties=== | ||
+ | |||
+ | ====inherited from TWidget==== | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#Enabled|Anchors]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#Enabled|Bounds]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#Color|Color]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#Cursor|Cursor]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#Enabled|Enabled]] | ||
+ | |||
+ | [[Reference:_MSEgui/TFace|Face]] | ||
+ | |||
+ | [[Reference:_MSEgui/TFont|Font]] | ||
+ | |||
+ | [[Reference:_MSEgui/TFrame|Frame]] | ||
+ | |||
+ | [[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]] | ||
+ | |||
+ | ====Caption==== | ||
+ | |||
+ | The Caption is the text the label displays. | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | {$ifdef mse_unicodestring} | ||
+ | msestring = unicodestring; | ||
+ | {$else} | ||
+ | msestring = widestring; | ||
+ | {$endif} | ||
+ | |||
+ | property caption: msestring; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ====Options==== | ||
+ | |||
+ | With the option lao_nogray you can prevent a label to be shown grayed if itself or a parent widget is disabled. | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | labeloptionty = (lao_nogray,lao_nounderline); | ||
+ | labeloptionsty = set of labeloptionty; | ||
+ | |||
+ | property Options: labeloptionsty default []; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | If you use a & char in a caption, the following char gets underlined. To prevent this use lao_nounderline: | ||
+ | |||
+ | [[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=== | ||
=== Events=== | === Events=== | ||
+ | |||
+ | ====Inherited from TWidget==== | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OnHint|OnHint]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OnEnter, OnFocus, OnActivate|OnEnter, OnFocus, OnActivate]] | ||
+ | |||
+ | [[Reference:_MSEgui/TWidget#OnNavigRequest|OnNavigRequest]] | ||
+ | |||
+ | [[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. | ||
+ | |||
+ | |||
+ | [[Category:MSEide+MSEgui]] |
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.