Page 1 of 1

Listbox - ListboxTextItem rendering issue

Posted: Mon Apr 20, 2009 14:23
by nairboon
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
???

Re: Listbox - ListboxTextItem rendering issue

Posted: Mon Apr 20, 2009 18:36
by CrazyEddie
Hi,

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

HTH

CE.

Re: Listbox - ListboxTextItem rendering issue

Posted: Mon Apr 20, 2009 20:31
by nairboon
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!

Re: Listbox - ListboxTextItem rendering issue

Posted: Tue Apr 21, 2009 08:28
by CrazyEddie
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 ;)

Re: Listbox - ListboxTextItem rendering issue

Posted: Mon Jun 08, 2009 20:42
by brucey
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?

Re: Listbox - ListboxTextItem rendering issue

Posted: Wed Jun 10, 2009 08:33
by CrazyEddie
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.