Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Proposed change for TabCtrl: Color of text...
Proposed change for TabCtrl: Color of text... [message #13374] |
Thu, 03 January 2008 16:20 |
|
tvanriper
Messages: 85 Registered: September 2007 Location: Germantown, MD, USA
|
Member |
|
|
The current chameleonized tabctrl is nice, and allows me to do some amazingly beautiful things with the tabs, but has a small problem; should I elect to use background graphics that are dark, you cannot see the text over the graphics, as the text's color comes from SColorText(), and cannot be set.
I've attached a Zip file with updated TabCtrl.h and TabCtrl.cpp files for your consideration.
I added the following changes:
to TabCtrl.h, in class Item::Style:
added line:
to TabCtrl.cpp:
add the following line to CH_STYLE(TabCtrl...
text_color = SColorText();
changed the following 2 lines to TabCtrl::Item::Paint:
pict.Paint(w, pictpos.x, pictpos.y, sz.cx, sz.cy, owner->style->text_color, Null);
w.DrawText(textpos.x, textpos.y, text, owner->style->font, owner->style->text_color);
-
Attachment: CtrlLib.zip
(Size: 4.55KB, Downloaded 221 times)
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 08:25:15 CET 2024
Total time taken to generate the page: 0.01400 seconds
|