Recent

Author Topic: StaticText not colored in a GroupBox  (Read 20487 times)

donnie

  • Jr. Member
  • **
  • Posts: 72
StaticText not colored in a GroupBox
« on: February 22, 2010, 11:56:32 am »
Hello!Nice job with the forum!!!My question is this:
When I place a Static box inside a GroupBox the backround of the static box remains white.I can't change its color!So when I build it in my PDA-Smartphone my groupbox is light blue and the static text is white(does't take the color of the form-groupbox).But when the static text is outside the groupbox, it takes normally the color of the form...
Do you know if I can change it and how?
I have attached a picture to show my problem...
« Last Edit: February 22, 2010, 01:54:42 pm by nek »

eny

  • Hero Member
  • *****
  • Posts: 1646
Re: StaticText not colored in a GroupBox
« Reply #1 on: February 22, 2010, 09:38:00 pm »
Maybe ParentColor defaults to false?
Or as a workaround, use a TLabel?
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

donnie

  • Jr. Member
  • **
  • Posts: 72
Re: StaticText not colored in a GroupBox
« Reply #2 on: February 23, 2010, 09:27:50 am »
I have tried Parentcolor true but the result is the same!
I don't use a Tlabel.Should I?

eny

  • Hero Member
  • *****
  • Posts: 1646
Re: StaticText not colored in a GroupBox
« Reply #3 on: February 23, 2010, 10:36:48 am »
IIRC a TLabel doesn't have a background.
So the only thing you'll see is the text, without the white box.
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

donnie

  • Jr. Member
  • **
  • Posts: 72
Re: StaticText not colored in a GroupBox
« Reply #4 on: February 23, 2010, 11:01:02 am »
The only problem is that a Tlabel does't appear to all PDAs and Smartphones.
On the other hand static text appears to everything, no matter what software they have
(eg.Win Mobile 5,1 - 6 - 7)!That's why I have used static text...
I used Tlabel and I was forced to change it,in order to be supported better.But I have
this problem with the backround color now....
« Last Edit: February 23, 2010, 11:04:23 am by nek »

eny

  • Hero Member
  • *****
  • Posts: 1646
Re: StaticText not colored in a GroupBox
« Reply #5 on: February 23, 2010, 11:04:22 am »
My mistake, I wasn't aware of that.
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

donnie

  • Jr. Member
  • **
  • Posts: 72
Re: StaticText not colored in a GroupBox
« Reply #6 on: February 23, 2010, 11:05:48 am »
No problem,If you think of (find) something please post it...
Thank you anyway...

Nicola Gorlandi

  • Full Member
  • ***
  • Posts: 132
Re: StaticText not colored in a GroupBox
« Reply #7 on: February 23, 2010, 01:17:17 pm »
I tested Tlabel on some Windows Mobile without problem except a bug in SVN version. Have you made some other test ?

donnie

  • Jr. Member
  • **
  • Posts: 72
StaticText not colored in a GroupBox
« Reply #8 on: February 25, 2010, 11:26:33 am »
In almost all Windows mobile a Tlabel text does't appear in many cases!So I tried a static text which appears everywhere!But with the static text a have this color problem in a group box(see image attached)!It would be very comfortable for me to use a Tlabel text but it is not reliable(it does't appear in a group box)!So I try to find a solution for the static text as it is more reliable but as it seems there is no solution with the color!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: StaticText not colored in a GroupBox
« Reply #9 on: February 26, 2010, 04:15:02 am »
TLabel works, but not inside a TGroupBox, see: http://bugs.freepascal.org/view.php?id=14760

TStaticText color works, but not inside a TGroupBox ... please report this as a bug

There is something wrong with TGroupBox and I tryed to fix today, but didn't manage. It seams that messages aren't sent to child controls of the group box, I checked that WM_CTLCOLORSTATIC is sent to the static text outside group box and also to the group box but not to child items ... maybe upon this message the group box should propage it to all child controls, don't know

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: StaticText not colored in a GroupBox
« Reply #10 on: February 26, 2010, 04:27:42 am »
I think I fixed it, please update your Lazarus and try again

donnie

  • Jr. Member
  • **
  • Posts: 72
StaticText not colored in a GroupBox
« Reply #11 on: February 26, 2010, 09:32:11 am »
Thank you very much for your concern!I'll try today's nightbuild to check it out...
Will the new version be ready tonight for download?ver 2.4.0?

« Last Edit: February 26, 2010, 10:50:10 am by nek »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: StaticText not colored in a GroupBox
« Reply #12 on: February 26, 2010, 01:06:04 pm »
I am not sure, I fixed at around 12pm Brazilian time. The server updates the snapshots at 12pm, but I don't know where it is located, if it is in Europe then only tomorrow one will have a snapshot with my fix.

donnie

  • Jr. Member
  • **
  • Posts: 72
Re: StaticText not colored in a GroupBox
« Reply #13 on: February 26, 2010, 01:21:11 pm »
Yes, I am in Europe!Especially in Greece!So I will wait for tomorrow...
Thank you anyway...

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: StaticText not colored in a GroupBox
« Reply #14 on: February 26, 2010, 04:14:28 pm »
Yes, I am in Europe!Especially in Greece!So I will wait for tomorrow...
Thank you anyway...

It doesn't depend on your location, but rather on the location of the server...

 

TinyPortal © 2005-2018