Recent

Author Topic: TSplitter color does not change.  (Read 4906 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
TSplitter color does not change.
« on: June 30, 2010, 05:01:41 am »

Whenever I change the color of a TSplitter in code, or in the IDE it doesn't work.

Is there some bug or am I doing something wrong. I have also noticed that the IDE in general doesn't often respond properly to color changes, but at least changes made at runtime should work.

Here is the offending code.
Code: [Select]
procedure TfrmHometel.SetSplitterSizes;
var
 i: integer;
begin
  for i:= 0 to ComponentCount - 1 do
  begin
   if Components[i] is TSplitter then
   begin
     with TSplitter(Components[i]) do
     begin
      if Cursor = crHSplit then
        Width := 7;
      if Cursor = crVSplit then
        Height := 7;
      ;
      Color := clBlue;
     end;
   end;
  end;
end;
Lazarus 3.0/FPC 3.2.2

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: TSplitter color does not change.
« Reply #1 on: June 30, 2010, 05:24:19 am »
Here it can change its color at run or design time.

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: TSplitter color does not change.
« Reply #2 on: June 30, 2010, 09:01:53 am »
What version of Lazarus and OS are you using?

Here it can change its color at run or design time.
Lazarus 3.0/FPC 3.2.2

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: TSplitter color does not change.
« Reply #3 on: June 30, 2010, 12:16:57 pm »
Lazarus 0.9.29 r24105 FPC 2.4.0 i386-win32-win32/win64
« Last Edit: June 30, 2010, 12:26:33 pm by typo »

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: TSplitter color does not change.
« Reply #4 on: June 30, 2010, 10:55:55 pm »
I downloaded the latest 0.9.29 and 0.9.28.3 and changing color works in them. I guess I have to upgrade my working setup, unless the TSplitter code alone can be changed.

I have also noticed that a lot of components don't change color at runtime in 0.9.28.2 so there must be something wrong in there.

Lazarus 0.9.29 r24105 FPC 2.4.0 i386-win32-win32/win64
Lazarus 3.0/FPC 3.2.2

 

TinyPortal © 2005-2018