Listbox - ListboxTextItem rendering issue

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

nairboon
Just popping in
Just popping in
Posts: 7
Joined: Fri Feb 06, 2009 20:36

Listbox - ListboxTextItem rendering issue

Postby nairboon » Mon Apr 20, 2009 14:23

I created a Listbox

Code: Select all

<Window Type="WindowsLook/Listbox" Name="R/MenuBox/ScenarioList" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" Value="List Box" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.0382938,0},{0.24673,0},{0.446821,0},{0.613393,0}}" />
                <Property Name="ForceVertScrollbar" Value="True" />
            </Window>


and added dynamicaly ListboxTextItems:

Code: Select all

Window * SBWindow = winMgr.getWindow("R/MenuBox/ScenarioList");
   
   Listbox* ScenarioLB = static_cast<Listbox*>(SBWindow);
    ScenarioLB->setMultiselectEnabled(false);
    ListboxTextItem* itemListbox = new ListboxTextItem("Value A",1);
              itemListbox->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");
    ScenarioLB->addItem(itemListbox);
    ScenarioLB->setItemSelectState(itemListbox, true);
    ScenarioLB->ensureItemIsVisible(itemListbox);

   
   
    ScenarioLB->handleUpdatedItemData();


but i looks like that:
Image
in the log file are no errors
???

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Listbox - ListboxTextItem rendering issue

Postby CrazyEddie » Mon Apr 20, 2009 18:36

Hi,

You have to set the text colour (ListboxTextItem::setTextColours) and probably the selection colour also (ListboxItem::setSelectionColours).

HTH

CE.

nairboon
Just popping in
Just popping in
Posts: 7
Joined: Fri Feb 06, 2009 20:36

Re: Listbox - ListboxTextItem rendering issue

Postby nairboon » Mon Apr 20, 2009 20:31

I tried them all, also setFont, setSelectionBrushImage. It didn't work in the WindowsLook!
now i changed to the TaharezLook and it works perfectly?!?!!
something is wrong with the windowslook...
but thanks for your good&fast support!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Listbox - ListboxTextItem rendering issue

Postby CrazyEddie » Tue Apr 21, 2009 08:28

Hmmm. That seems a little odd, it shouldn't really matter which 'look' the container list is, however I will do a test in case I broke something ;)

brucey
Just popping in
Just popping in
Posts: 10
Joined: Fri Sep 26, 2008 09:38
Location: Solihull
Contact:

Re: Listbox - ListboxTextItem rendering issue

Postby brucey » Mon Jun 08, 2009 20:42

I seem to have the same issues with WindowsLook, in the Listbox, Combobox and MultiColumnList .

I thought it was maybe a problem with my wrapper (for BlitzMax), but my rendering problems look exactly like that screenshot in the first post.

Any ideas what might be wrong?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Listbox - ListboxTextItem rendering issue

Postby CrazyEddie » Wed Jun 10, 2009 08:33

Could one of you guys post up a minimal - but complete - example app that does this please, because back in April when I tested it out using the snippets above I could not reproduce any issues.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 10 guests