Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
tvanriper is currently offline  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:

Color text_color;


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)
Re: Proposed change for TabCtrl: Color of text... [message #13376 is a reply to message #13374] Thu, 03 January 2008 17:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
A good idea. I have only extended it to text_color[4] Smile

Mirek
Re: Proposed change for TabCtrl: Color of text... [message #13382 is a reply to message #13374] Thu, 03 January 2008 18:54 Go to previous message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
Ah, yes, that would certainly work better.
Previous Topic: can't WithDropChoice's data be accessed?
Next Topic: how to input an int into std::string? and an exception question
Goto Forum:
  


Current Time: Fri Mar 29 08:25:15 CET 2024

Total time taken to generate the page: 0.01400 seconds