help for tgui v0.7 listbox change text colors

Started by arturo.tramontini, 30 September 2015, 06:32:53


    i have the following code:
   tgui::ListBox::Ptr listBox =  theme->load("ListBox");
    listBox->setPosition(10, 240);
    listBox->setSize(410-10, 420);
   how can i change TextColor Normal and Hover ?
   i see that there is a getRenderer()  and a ListBoxRenderer()
   but i'm not be able to use it because of my lack in knowledge of c++ syntax.
   if possible, can you help me with a little example for how change colors?
   (for example making normal text color black  and hover white)


i try casually this code and it give me the result that i want:


is it correct?


Yep, that is indeed the code that you need.
The renderer always gets created together with the widget so you just have to call getRenderer to access it.