ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxPython-users
wxPython-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved