I found the workaround for the ListIconGadget, but is there a similar for the ListViewGadget?
Thanks in advance
Need workaround SetGadgetItemColor with ListViewGadget
Need workaround SetGadgetItemColor with ListViewGadget
Last edited by ozak on Thu Feb 07, 2013 11:42 am, edited 2 times in total.
Re: Workaround for SetGadgetItemText problem with ListViewGa
Can you give a code example of the problem ?
When I try SetGadgetIemText with a ListViewGadget (PB 5.10b7) it seems to work fine
When I try SetGadgetIemText with a ListViewGadget (PB 5.10b7) it seems to work fine
Re: Workaround for SetGadgetItemText problem with ListViewGa
Sorry. I mean the color of an item
Code: Select all
OpenWindow(0,100,100,640,480,"Test")
ListViewGadget(0,0,0,640,480)
For i=1 To 10
AddGadgetItem(0,-1,"Test"+Str(i))
Next
SetGadgetItemColor(0,2,#PB_Gadget_FrontColor,RGB(Random(255), Random(255), Random(255)),0)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
Re: Need workaround SetGadgetItemColor with ListViewGadget
This is not supported.
The only thing you can do is use alternating row colors.
PB 5.10b7 example ...
The only thing you can do is use alternating row colors.
PB 5.10b7 example ...
Code: Select all
OpenWindow(0,100,100,640,480,"Test")
ListViewGadget(0,0,0,640,480)
CocoaMessage(0, GadgetID(0), "setUsesAlternatingRowBackgroundColors:", #YES)
For i=1 To 10
AddGadgetItem(0,-1,"Test"+Str(i))
Next
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
Re: Need workaround SetGadgetItemColor with ListViewGadget
No workaround using CocoaMessage? I tried searching the Apple docs but no luck so far
Re: Need workaround SetGadgetItemColor with ListViewGadget
You may try this workaround which allows you to change text and back color of single rows.ozak wrote:No workaround using CocoaMessage? I tried searching the Apple docs but no luck so far