Questions tagged [tlabel]

tlabel is a nonwindowed VCL control that displays non editable text on a form. It is defined in the StdCtrls.pas unit.

33 questions
12
votes
2 answers

In Ruby, what exactly does tLABEL mean?

I usually gloss over this error when I get it and just fix whatever syntax error caused it, but out of curiosity, what exactly does tLABEL mean in unexpected tLABEL? I've tried searching for the answer, but just get a ton of people trying to get…
Arel
  • 3,888
  • 6
  • 37
  • 91
10
votes
2 answers

Delphi XE2 TLabel glowsize causes graphic issue on top left corner of the screen

Ever since porting an app from XE to XE2 I noticed a strange bug, just opening the form in the ide or running the app, a white square box is drawn on the top left corner of the screen (out of the form), which goes away upon hovering the mouse or a…
hikari
  • 3,393
  • 1
  • 33
  • 72
9
votes
2 answers

Changing the font of a Delphi TLabel to Italic chops off the tail - why?

A simple demo of a default TLabel with font set to Arial Regular 16 is shown below. The code when the button is clicked is: procedure TForm1.Button1Click(Sender: TObject); begin Label1.Font.Style := Label1.Font.Style + [fsItalic]; end; When you…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
7
votes
4 answers

How do I make a TLabel behave like a hyperlink in Delphi?

How do I make a TLabel behave like a hyperlink in Delphi? Note: I'm not interested in using TLinkLabel because of backwards compatibility issues.
Rowan
  • 2,384
  • 2
  • 21
  • 22
4
votes
1 answer

Implementing a TLabel with TabStop and FocusRect?

I'm using Delphi7 and I'm trying to implement a LinkLabel like the ones you can find under the Control Panel on Windows Vista and above. Changing the cursor/color on hover is really simple, the only thing I need to do is to make the TLabel receive…
Steve
  • 2,510
  • 4
  • 34
  • 53
4
votes
2 answers

Getting the MaxLen parameter to use with MinimizeName

I am trying to put a very long filename on a TLabel using the MinimizeName function from Vcl.FileCtrl unit but I can't figure out how to get the MaxLen parameter used by the function If I hardcode a value I can see a valid result. But since the form…
OZ8HP
  • 1,443
  • 4
  • 31
  • 61
3
votes
1 answer

How can I know if a TLabel word wrapped the text?

I create a TLabel and add text to it dynamically, and that works just fine. But I need to know if the label word-wrapped the text because it was too large for the label's width, or if there was no need to it to wrap because the text was shorter than…
Hiram
  • 159
  • 1
  • 9
3
votes
2 answers

How best to programmatically tell whether a TLabel's Caption is clipped (i.e. drawn using ellipsis)?

I have a TLabel with EllipsisPosition set to epEndEllipsis and I need to be able to tell whether the text is currently clipped or not. Besides calculating the area required to display the text myself and comparing it with the actual dimensions of…
Oliver Giesen
  • 9,129
  • 6
  • 46
  • 82
3
votes
2 answers

How to set label text bold in delphi Xe8

How can you set a TLabel to Bold and back to normal runtime in Delphi XE8 firemonkey multi device project? I've tried this but it doesn't work: label.TextSettings.Font.Style := [TFontStyle.fsBold]; Also tried: label.Font.Style :=…
Remi
  • 1,289
  • 1
  • 18
  • 52
3
votes
2 answers

TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor

Is it possible to change .Font.Style on Focus TLabel or TNewStaticText like it happens with cursor when we use .Cursor?
RobeN
  • 5,346
  • 1
  • 33
  • 50
2
votes
1 answer

TLabel.AutoSize not working when Label.Align = alTop

In a Delphi 10.4.2 32-bit Delphi VCL Application, I have a TLabel set on top of a TCard: object lblColorTransparencyInfo: TLabel AlignWithMargins = True Left = 5 Top = 37 Width = 156 Height = 20 Margins.Left = 5 Margins.Top = 5 …
user1580348
  • 5,721
  • 4
  • 43
  • 105
2
votes
2 answers

Find number of lines in label with fixed length and word wrap property true

I have a label with fixed length and word wrap property set to true. At run time that label has two lines e.g.: test := 'quick brown fox jumps over the lazy dog'; On Label this text displayed as two lines quick brown fox jumps over the lazy dog I…
Rahul Bajaj
  • 135
  • 2
  • 14
2
votes
3 answers

Determine Width of TLabel

Hello Stack Overflow Users I have a TGroupBox with a TLabel in it. With this TLabel I want to display the surname and names of a candidate. Some candidates have more than one name, sometimes three, and when that happens, the TLabel doesn't always…
2
votes
1 answer

Create and then destroy TLabels at runtime in Firemonkey

I'm trying to generate TLabels at runtime and insert them into a VertScrollBox with this code; var i, f: integer; RT_Label: TLabel; begin f:= 10; for i := 0 to 20 do begin RT_Label := TLabel.Create(Self); RT_Label.Name…
Juande
  • 73
  • 1
  • 10
2
votes
0 answers

Delphi XE5 TLabel Word Wrapping

I'm having a hell of a time trying to get word wrapping working correctly with the TLabel component in a Delphi XE5 Firemonkey mobile app. The background is that I am trying to programmatically populate a TScrollBox component on a form with various…
dddaaammmooo
  • 21
  • 1
  • 4
1
2 3