Setting different color background and text in wx.ListCtrl column 0 [header]

687 views
Skip to first unread message

Anil Sharma

unread,
Aug 5, 2010, 5:03:04 PM8/5/10
to wxpytho...@googlegroups.com
Hi everyone ,
  I have been trying to serach a simple style syntax for making the header ie: column number zero of wx.ListCtrl in wxpython
to set its background color and text in different color and style .. also the text [font color] in different color.
Thanks in advance ,
 
regards
anil

Mike Driscoll

unread,
Aug 5, 2010, 5:27:20 PM8/5/10
to wxPython-users
As far as I know, the wx.ListCtrl does not support that behavior. The
UltimateListCtrl might and if not, you can hack it for that sort of
thing, I think...

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Anil Sharma

unread,
Aug 5, 2010, 6:19:26 PM8/5/10
to wxpytho...@googlegroups.com
Thanks mike for the suggestion , if we have to hack it can you please where can i get such kind of guides ... what i
 was thinking was that i could get a simple syntax like style = " bla bla" ... Please do guide me.
Thanks for your concern,

anil ph


Mike Driscoll

unread,
Aug 6, 2010, 9:25:50 AM8/6/10
to wxPython-users


On Aug 5, 5:19 pm, Anil Sharma <ph.anilsha...@gmail.com> wrote:
> Thanks mike for the suggestion , if we have to hack it can you please where
> can i get such kind of guides ... what i
>  was thinking was that i could get a simple syntax like style = " bla bla"
> ... Please do guide me.
> Thanks for your concern,
>
> anil ph

The nice thing about the UltimateListCtrl is that it's pure python,
not SWIGGed C++. So you can use Python to add or remove features,
change the way it draws to the screen, etc. You'd need to read the
source to figure it out though.

Anil Sharma

unread,
Aug 6, 2010, 9:43:00 AM8/6/10
to wxpytho...@googlegroups.com
Thanks mike  ... but i would like to enquire one thing is that , in each row i want to handle a click evnt so that i can work on each row click a function.Can you please tell me if ultimateListCtrl will serve my purpose  .... Thanks

regards,
anil ph


Mike Driscoll

unread,
Aug 6, 2010, 5:08:42 PM8/6/10
to wxPython-users


On Aug 6, 8:43 am, Anil Sharma <ph.anilsha...@gmail.com> wrote:
> Thanks mike  ... but i would like to enquire one thing is that , in each row
> i want to handle a click evnt so that i can work on each row click a
> function.Can you please tell me if ultimateListCtrl will serve my purpose
> .... Thanks
>
> regards,
> anil ph

You should be able to use click events just like you do with any other
widget.
Reply all
Reply to author
Forward
0 new messages