Sign in Join
Wiki copytemporary

Reference: MSEgui/TLabel: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Reference: MSEgui/TLabel

OldNewLine
1+# TLabel
2+
3+**ready for revision**
4+
5+TLabel shows some Text on the form.
6+
7+![](/wiki-images/1/18/Msegui_TLabel.png)
8+
9+### Alternatives
10+
11+- You can use TDispWidget successor like TStringDisp
12+- If you want display text next to a widget, you can use TFrame.Caption of this component.
13+
14+## Reference
15+
16+### Hierarchy
17+
18+- TObject
19+- TPersistent
20+- TComponent
21+- [[Reference: MSEgui/TMseComponent|TMseComponent]]
22+- TActComponent
23+- [[Reference: MSEgui/TWidget|TWidget]]
24+- TActionWidget
25+- TActionPublishedWidgetNwr
26+- TPublishedWidgetNwr
27+- TPublishedWidget
28+- TCustomLabel
29+- TLabel
30+
31+### Properties
32+
33+#### inherited from TWidget
34+
35+[[Reference: MSEgui/TWidget|Anchors]]
36+
37+[[Reference: MSEgui/TWidget|Bounds]]
38+
39+[[Reference: MSEgui/TWidget|Color]]
40+
41+[[Reference: MSEgui/TWidget|Cursor]]
42+
43+[[Reference: MSEgui/TWidget|Enabled]]
44+
45+[[Reference: MSEgui/TFace|Face]]
46+
47+[[Reference: MSEgui/TFont|Font]]
48+
49+[[Reference: MSEgui/TFrame|Frame]]
50+
51+[[Reference: MSEgui/TWidget|Hint]]
52+
53+[[Reference: MSEgui/TWidget|OptionsWidget]]
54+
55+[[Reference: MSEgui/TWidget|OptionsWidget1]]
56+
57+[[Reference: MSEgui/TWidget|PopupMenu]]
58+
59+[[Reference: MSEgui/TWidget|TabOrder]]
60+
61+[[Reference: MSEgui/TWidget|Visible]]
62+
63+#### Caption
64+
65+The Caption is the text the label displays.
66+
67+``` pascal
68+{$ifdef mse_unicodestring}
69+ msestring = unicodestring;
70+{$else}
71+ msestring = widestring;
72+{$endif}
73+
74+property caption: msestring;
75+```
76+
77+#### Options
78+
79+With the option lao_nogray you can prevent a label to be shown grayed if itself or a parent widget is disabled.
80+
81+``` pascal
82+labeloptionty = (lao_nogray,lao_nounderline);
83+labeloptionsty = set of labeloptionty;
84+
85+property Options: labeloptionsty default [];
86+```
87+
88+If you use a & char in a caption, the following char gets underlined. To prevent this use lao_nounderline:
89+
90+![](/wiki-images/4/41/Msegui_label_options.png%E2%80%8E)
91+
92+#### TextFlags
93+
94+With TextFlags you can specify things like alignment or rotation. See the following image and the image at [[Reference: MSEgui/TFrame|CaptionTextFlags]]
95+
96+``` pascal
97+textflagty = (tf_xcentered, tf_right, tf_xjustify, tf_ycentered, tf_bottom,
98+ tf_rotate90, tf_rotate180,
99+ tf_clipi, tf_clipo,
100+ tf_grayed, tf_wordbreak, tf_softhyphen,
101+ tf_noselect, tf_underlineselect,
102+ tf_ellipseleft, tf_ellipseright,
103+ tf_tabtospace, tf_showtabs,
104+ tf_force);
105+textflagsty = set of textflagty;
106+
107+property TextFlags: textflagsty default defaultlabeltextflags;
108+```
109+
110+![](/wiki-images/a/aa/Msegui_label_textflags.png%E2%80%8E)
111+
112+### Methods
113+
114+### Events
115+
116+#### Inherited from TWidget
117+
118+[[Reference: MSEgui/TWidget|OnHint]]
119+
120+[[Reference: MSEgui/TWidget|OnEnter, OnFocus, OnActivate]]
121+
122+[[Reference: MSEgui/TWidget|OnNavigRequest]]
123+
124+[[Reference: MSEgui/TWidget|OnPopup]]
125+
126+[[Reference: MSEgui/TWidget|OnPaint, OnPaintBackground, OnAfterPaint, OnPaintBackground]]
127+
128+Inherited from TMseComponent: [[Reference: MSEgui/TMseComponent|OnBeforeUpdateSkin, OnAfterUpdateSkin]]
129+
130+## Known issues
131+
132+### Issues of the class
133+
134+### Issues of this documentation
135+
136+Feel free to add your points here.
137+
138+---
139+*From the Free Pascal wiki, page "Reference: MSEgui/TLabel", as it stood on 2020-02-25 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
140+Category: MSEide+MSEgui

Back to history