Lazarus
Programming => General => Topic started by: Deepaak on February 16, 2013, 12:35:11 pm
-
Hi I had tried a lot but it does not works for me,
Checkbox1.Font.Color:=clRed;
Radiobutton1.Font.Color:=clRed;
Windows 7 SP1 and Windows XP Sp3.
Lazarus 1.0.4 fpc 2.6.0
Is there any other way to implement this.
Update:
Bug Reported : http://bugs.freepascal.org/view.php?id=23905
Please help, which svn version is good enough for this task, so i can continue with development.
-
Droping those components on a form and changing the font.color property from the object inspector I did not see any problem the color is shown correctly on the designer at least
Lazarus 1.1 r38674 FPC 2.6.1 i386-win32-win32/win64 on win7 32bits.
-
It is related to themes and Windows version.
For example when I implemented the filter support for options dialog in Lazarus, I first used a distinctive font color to indicate matches.
Unfortunately it did not work on Windows for me and for many others, but it worked for some people. On Linux it worked always.
Anyway, I had to change it for Bold-Italics text which worked always.
If someone knows how to fix it, I would be happy to hear.
Juha
-
Droping those components on a form and changing the font.color property from the object inspector I did not see any problem the color is shown correctly on the designer at least
Lazarus 1.1 r38674 FPC 2.6.1 i386-win32-win32/win64 on win7 32bits.
Is lazarus 1.1 is release version
-
The latest release of lazarus is 1.0.6 I'm using a daily build until the fpc 2.6.2 comes out and lazarus makes a release with it, I'm waiting it out.
-
The latest release of lazarus is 1.0.6 I'm using a daily build until the fpc 2.6.2 comes out and lazarus makes a release with it, I'm waiting it out.
Is it safe to use daily build in product development .
It is really a good news, hope it is released soon.
Which daily version is good, please mention
-
Is there any workaround in lazarus 1.0.6 (FPC 2.6.0) for this problem.
-
If it is theme based as juha said then I do not think that a newer Lazarus version will help. I have themes disabled on my laptop it is not powerful enough to support them. You can disable them and test on your system to find out.
-
If it is theme based as juha said then I do not think that a newer Lazarus version will help. I have themes disabled on my laptop it is not powerful enough to support them. You can disable them and test on your system to find out.
I am thinking to subclass the window and override the WM_CTLCOLORSTATIC Message. But it also failed.
-
I am unable to subclass this control, Why
function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam; lParam: LParam):LRESULT; stdcall;
var
hdcStatic : HDC;
Begin
case uMsg of
WM_CTLCOLORSTATIC:
Begin
hdcStatic := HDC(wParam);
SetTextColor(hdcStatic, RGB(23,73,107));
SetBkColor(hdcStatic, RGB(0,0,0));
result := LRESULT(GetStockObject(NULL_BRUSH));
End;
End;
result:=CallWindowProc(PrevWndProc,Ahwnd, uMsg, WParam, LParam);
End;
-
Please help, which svn version is good enough for this task, so i can continue with development.
-
Strange question. Why don't you just use trunk?
You can always have another stable Lazarus installed with a different primary-config-path. See the wiki articles on installing Lazarus side by side.
-
I am thinking to subclass the window and override the WM_CTLCOLORSTATIC Message. But it also failed.
Did you understand what people explain to you about Windows themes?
Did you try to change / disable them?
Juha
-
If you want to use custom colors and ensure that the final user will see them, and don't worry if the user has themes or not use Custom Drawn Controls.
There is a theme with uses images and is really easy to modify (just change the images):
http://wiki.lazarus.freepascal.org/BGRAControls#Custom_Drawn_Windows_7
Or do your own theme.
Custom Drawn comes with Lazarus, is an official package, just install it and rebuild lazarus, and is in the components folder.
-
Strange question. Why don't you just use trunk?
You can always have another stable Lazarus installed with a different primary-config-path. See the wiki articles on installing Lazarus side by side.
Using the latest trunk Lazarus 1.1 40350M with FPC 2.6.1
The results are same. :(
I had found that when changing the parent background color changes the checkbox/radiobutton background color successfully, but this is not possible from property editor/code.
If some how parent font color can be applied to checkbox/radiobutton font.color, then it will help a lot. Same as parent background color.
-
Strange question. Why don't you just use trunk?
You can always have another stable Lazarus installed with a different primary-config-path. See the wiki articles on installing Lazarus side by side.
Using the latest trunk Lazarus 1.1 40350M with FPC 2.6.1
The results are same. :
Not really surprising given what people keep trying to tell you...