Recent

Author Topic: TLabel or TStaticText? Which one and when to use it?  (Read 4117 times)

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #30 on: February 05, 2023, 02:07:01 pm »
What do you mean by "on top" and "below"? I guess now that you mean Z-order "Front"/"Forward" and "Back", not what you see on the screen. In this case I agree with you, Z-order does not affect the behaviour of TLabel.
But you confused me with your terminology. %) For me Label is "on top" at the first picture, and "below" at the second.
Yes with "on top" and "bellow" I'm talking about the z order and no its not the same, which is evident by the frame line on top of the tlabel in your screenshot.

I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #31 on: February 05, 2023, 03:31:15 pm »
What do you mean by "on top" and "below"? I guess now that you mean Z-order "Front"/"Forward" and "Back", not what you see on the screen. In this case I agree with you, Z-order does not affect the behaviour of TLabel.
But you confused me with your terminology. %) For me Label is "on top" at the first picture, and "below" at the second.
Yes with "on top" and "bellow" I'm talking about the z order and no its not the same, which is evident by the frame line on top of the tlabel in your screenshot.

I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.

is not the same.

tlabel is drawn on the canvas of the parent control. tstatictext has his own canvas than can be placed half in the form and half in the tpanel...
« Last Edit: February 06, 2023, 01:23:21 am by lainz »

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #32 on: February 05, 2023, 08:11:25 pm »
is not the same.

tlabel is drawn on the canvas of the parent control. tstatictext has his own canvas than can be placed half in the form and half in the tpanel...

Sure they are not the same. But I did not mention TStaticText in my posts. I wrote only about TLabel.

And correct your post, please, as it looks like I wrote your words.

domasz

  • Sr. Member
  • ****
  • Posts: 423
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #33 on: February 05, 2023, 08:53:27 pm »
I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.
The picture is the same because changing z-order doesn't work for TLabel. It's always behind TPanel.

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #34 on: February 05, 2023, 09:27:00 pm »
I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.
The picture is the same because changing z-order doesn't work for TLabel. It's always behind TPanel.

That's what I have written. I have not understood, what is "not the same".

eljo

  • Sr. Member
  • ****
  • Posts: 468
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #35 on: February 05, 2023, 09:35:16 pm »
I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.
The picture is the same because changing z-order doesn't work for TLabel. It's always behind TPanel.

That's what I have written. I have not understood, what is "not the same".
Zoom the image see the white line on top of the tlabel and bellow the tstatictext. Transparent tpanel and on top of the tpanel is not the same.

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #36 on: February 05, 2023, 09:47:36 pm »
I don't understand what do you mean again. What is "not the same"? I changed Z-order of Label1 regarding Panel1 in all ways, and the picture is the same.
The picture is the same because changing z-order doesn't work for TLabel. It's always behind TPanel.

That's what I have written. I have not understood, what is "not the same".
Zoom the image see the white line on top of the tlabel and bellow the tstatictext. Transparent tpanel and on top of the tpanel is not the same.

I have already written, that I agree with you. There's no need to convince me further. I have explained that I understood "on top" not in the sense of Z-order. If you were more clear in your terminology, there was no confusing.

PS. And "no its not the same" and "Transparent tpanel and on top of the tpanel is not the same" is not the same.  :D
« Last Edit: February 05, 2023, 10:02:06 pm by tetrastes »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2010
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #37 on: February 05, 2023, 10:07:43 pm »
i do not understand your strange discussion.
whoever told first that a tlabel is always behind a tpanel is wrong - at least on windows

but probably i misunderstood something
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #38 on: February 05, 2023, 10:47:43 pm »
Oh, I am not alone.  :D

@eljo
See, what your ambiguous terminology leads to.

eljo

  • Sr. Member
  • ****
  • Posts: 468
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #39 on: February 05, 2023, 11:17:18 pm »
i do not understand your strange discussion.
whoever told first that a tlabel is always behind a tpanel is wrong - at least on windows

but probably i misunderstood something
your image makes my point. Observe the white line on top of tlabel and read my messages again.

Sorry but I'll not repeat my self again, it's awkward typing on a smart phone.
P

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2010
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #40 on: February 05, 2023, 11:26:47 pm »
Than probably don't overlap, why should you do at all and what has it to do with topic "TLabel or TStaticText" ?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #41 on: February 06, 2023, 01:23:51 am »
And correct your post, please, as it looks like I wrote your words.

Sorry I was writing from my phone.. Didn't notice.  :)

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: TLabel or TStaticText? Which one and when to use it?
« Reply #42 on: February 06, 2023, 08:46:12 am »
what has it to do with topic "TLabel or TStaticText" ?

It is about that Z-order does not work for TLabel, but works for TStaticText.

 

TinyPortal © 2005-2018