Re: [wxPython-users] wx.ListItem.GetBackgroundColour() return (-1,-1,-1)
by Robin Dunn other posts by this author
Jul 22 2004 5:51PM messages near this date
[wxPython-users] wx.ListItem.GetBackgroundColour() return (-1,-1,-1)
|
[wxPython-users] Doubt with event handling: can I event.Skip() all the time?
Vladimir Ignatov wrote:
> Hello!
>
> I can't understand that wx.ListItem.GetBackgroundColour() actually return.
> Consider this:
>
> item = the_list.GetItem( row, column ) # take list item
> print item.GetBackgroundColour().Get() # got (-1,-1,-1) - no colors?
> what is it mean?
Yes. (-1, -1, -1) is the tuple version of an invalid colour.
wx.NullColour should give you the same thing.
>
> item.SetBackgroundColour( (2,2,2) ) # well, lets fix colors
> print item.GetBackgroundColour().Get() # got my (2,2,2) back, that's okay
> the_list.SetItem( item ) # write item to list
>
> item2 = the_list.GetItem( row, column ) # take the same list item again
> print item2.GetBackgroundColour().Get() # now got (-1,-1,-1) (!?)
> Where is my (2,2,2) gone?
Not sure. Try the_list.SetItemBackgroundColour instead of doing it
through the item.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thread:
Vladimir Ignatov
Robin Dunn
|