Re: Coloured Text in Controls
- Posted by jordah at btopenworld.com Mar 28, 2003
- 363 views
Hi Rangi, This is possible to do win32 api. so with a little dirty win32lib code you can get it to work. Its all about learning how to obtain DC's of the controls and when to paint them. Since EditControls and Labels are global classes, you will have to make them owner-drawn(In able to get the correct DC and paint oppurtunity(WM_DRAWITEM). Another way to achieve this(More Complex but efficient) is super-classing the global controls.) Also(less efficient) is to trap the WM_CTLCOLOREDIT message. This method is not 100% efficient because i've tried it on editControls before(text color change doesn't always work for some colours). Otherwise setting background colour works well for it. I'm trying to get this to work in euwin and once i do, u'll get the code. Till then, research on the above key points and u'll get it working. Jordah ----- Original Message ----- From: <totorangi at hotmail.com> To: "EUforum" <EUforum at topica.com> Sent: Friday, March 28, 2003 12:30 AM Subject: Coloured Text in Controls > > I want to change the text colour of controls in Win32lib such as > EditText and labels. Have read old discussions which seem to indicate > this is not possible, or leastways not easy. Is this still the case ? > > Cheers > Rangi > > > > TOPICA - Start your own email discussion group. FREE! > >