Page 1 of 1
WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 15:14
by daesdemon
Hello again,
Sorry to be so disturbing.
I used the WindowsLook because i find it make smaller interfaces.
I get a problem when i create a Combobox because the color of the text in the drop list seems to be the same than the background(white), so my droplist works good but i cannot see the ListItemText.
When i use TaharezLook, it's ok, white text on black background.
Is there a way to change the droplist text.
I try all the setXXXcolour but noone do anything in the droplist.
Perhaps could get a pointer on the droplist window in any way?
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 16:08
by Guest
Looks like the same as this one :
http://www.cegui.org.uk/modules/newbb/v ... 97&forum=2
Maybe lindquist could help?
I think you have to modify the ColourRect used when you call function "drawText" on your Font object.
Maybe just change the "DefaultColour" value in CEGUIFont.h?
--
Chris
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 17:01
by daesdemon
Thanks Chris.
I haven't have even a look in the CEGUI source because my main project is about Ogre.
So i just use the compiled version of CEGUI (CVS one), but I think i will have a look soon, because there is too much things that i have to understand.
I had a look on the lindquist's post, he said
Setting the color to black fixed it !
, but i don't see what he meant.
I try
Code: Select all
Combobox->setNormalTextColour(CEGUI::colour(0,0,0));
but it only change the color of the editBox not the droplist one.
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 17:50
by daesdemon
I am just stupid
I had just to change the color of each item of the combobox that's all
That's the code
Code: Select all
while (Chaque item)
{
item = new ListboxTextItem(ItemText, ItemID);
item->setTextColours(CEGUI::colour(0,0,0));
mCombobox->addItem(item);
}
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 18:07
by Guest
I've tested that and it worked for me with Ogre Demo_Gui.
When you create your item, before adding it to the droplist, do this :
item = new CEGUI::ListboxTextItem((CEGUI::utf8*)"Horizontal Scrollbar", 1);
item->setTextColours(CEGUI::colour(1,0,0));
objectComboBox->addItem(item);
Hope this helps
--
Chris
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 18:10
by Guest
Arg
I'm too slow with my tests
17 minutes too late
--
Chris
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 20:25
by daesdemon
hehe, thx m8, it seems to be a confirmed solution to this little problem

.
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 21:31
by lindquist
Hi.
It's exactly what I did, but it's not really a solid solution...
At least not in my case. I want to be able to use which ever look I feel like and I really don't want to be writing look specific code. ex.
Code: Select all
col = ( look == "TaharezLook" ) ? colour(0,0,0) : colour(1,1,1);
But as I will soon post on dev forums, I'm working on a new system for listboxes and its like.
(see the roadmap for details)
I really need a working menu system, so I've decided to make these changes.
Re: WindowsLook ComboBox Color Problem
Posted: Wed Mar 30, 2005 23:09
by daesdemon
Great, lindquist.
I understand that's not a robust solution.
In my case for the moment, as i am a complete beginner in CEGUI, i am only trying to make the things behave like i want.
I am not able to examine the CEGUI code, and submit patches, at least for now.
Happy that you're working on that.
A great menu system will rock
