Difference between revisions of "Reference: MSEgui/TLabel"

From Free Pascal wiki
Jump to navigationJump to search
m (Fixed syntax highlighting)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
=TLabel=
 
=TLabel=
  
''' work in progres'''
+
''' 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 61: 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 75: 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 91: Line 95:
 
With TextFlags you can specify things like alignment or rotation. See the following image and the image at [[Reference:_MSEgui/TFrame#Caption|CaptionTextFlags]]
 
With TextFlags you can specify things like alignment or rotation. See the following image and the image at [[Reference:_MSEgui/TFrame#Caption|CaptionTextFlags]]
  
<syntaxhighlight>
+
<syntaxhighlight lang=pascal>
 
textflagty = (tf_xcentered, tf_right, tf_xjustify, tf_ycentered, tf_bottom,  
 
textflagty = (tf_xcentered, tf_right, tf_xjustify, tf_ycentered, tf_bottom,  
 
               tf_rotate90, tf_rotate180,
 
               tf_rotate90, tf_rotate180,
Line 111: Line 115:
 
=== Events===
 
=== Events===
  
====inherited from TWidget====
+
====Inherited from TWidget====
  
 
[[Reference:_MSEgui/TWidget#OnHint|OnHint]]
 
[[Reference:_MSEgui/TWidget#OnHint|OnHint]]
Line 125: Line 129:
 
Inherited from TMseComponent: [[Reference:_MSEgui/TMseComponent#OnBeforeUpdateSkin.2C_OnAfterUpdateSkin|OnBeforeUpdateSkin, OnAfterUpdateSkin]]
 
Inherited from TMseComponent: [[Reference:_MSEgui/TMseComponent#OnBeforeUpdateSkin.2C_OnAfterUpdateSkin|OnBeforeUpdateSkin, OnAfterUpdateSkin]]
  
==known issues==
+
==Known issues==
  
===issues of the class===
+
===Issues of the class===
  
===issues of this documentation===
+
===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.

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

Hierarchy

  • TObject
  • TPersistent
  • TComponent
  • TMseComponent
  • TActComponent
  • TWidget
  • TActionWidget
  • TActionPublishedWidgetNwr
  • TPublishedWidgetNwr
  • TPublishedWidget
  • TCustomLabel
  • TLabel

Properties

inherited from TWidget

Anchors

Bounds

Color

Cursor

Enabled

Face

Font

Frame

Hint

OptionsWidget

OptionsWidget1

PopupMenu

TabOrder

Visible

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:

msegui label options.png


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;

msegui label textflags.png

Methods

Events

Inherited from TWidget

OnHint

OnEnter, OnFocus, OnActivate

OnNavigRequest

OnPopup

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.