Recent

Author Topic: Frame color  (Read 3166 times)

Edson

  • Hero Member
  • *****
  • Posts: 1302
Frame color
« on: May 24, 2015, 01:10:25 am »
Probably a silly question. How can I set the color of a TFrame?
I change the Color property, but it doesn't work.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Frame color
« Reply #1 on: May 24, 2015, 11:20:06 am »
That's bug IMO. Color of TFrame should be changeable in any case. What OS and what widgetset ?

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: Frame color
« Reply #2 on: May 24, 2015, 03:25:31 pm »
@Edson
The color changed as excpected in my system

have in mind that frames are not reflecting gui changes to existing instances

ex : if you have frame1 with color red
and place frame1 on form1 you should see a red frame on the form1
if you change the color to green and place the same frame1 in form2 you will have for the same frame a red one on form1 and a green one on form2
Only code is  available in all instances nothing related to gui
so if you want all your frames red you have to delete and re add them !!! or change the color of them one by one
« Last Edit: May 24, 2015, 03:52:22 pm by Never »
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: Frame color
« Reply #3 on: May 24, 2015, 06:02:31 pm »
@zeljko, I'm starting to think that it's a bug too. I have set the ParentColor to FALSE, and changed the color by code too, but no success anyway. My system is in my signature.

@Never, I have taken care on replace the frame on the form, after changing the color. What is your system?

I have added this line for to make it works:

Code: [Select]
 
  self.ControlStyle:=self.ControlStyle + [csOpaque];
  self.Color:=clRed;
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: Frame color
« Reply #4 on: May 24, 2015, 06:18:05 pm »
mentioned on the left
[OS:Win7 64bit / Lazarus 1.4]
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

 

TinyPortal © 2005-2018