I just started using wxGrid in my app because wxListCtrl wasn’t capable enough. My goal was to make my derived wxGrid control look like a wxListCtrl so that it would fit in with the other controls I built. Unfortunately wxGrid seems to render its own column and row labels. These labels don’t look at all like wxListCtrls column labels and makes my Grid control stick out like a sore thumb. Is there a way to bring these two controls into sync in terms of appearance? My first attempt at acheiving this involved overriding the paint message from the window retrieved by calling GetGridColLabelWindow(). This gives me control over appearance but I can’t seem to replicate the look exactly. Can any one point to some code to replicate the look accurately. Or is there a way that I can defer the rendering to windows with a flag or something?
Thanks,
Jenna
···
Do you Yahoo!? vote.yahoo.com - Register online to vote today!
I just started using wxGrid in my app because wxListCtrl wasn't capable enough. My goal was to make my derived wxGrid control look like a wxListCtrl so that it would fit in with the other controls I built. Unfortunately wxGrid seems to render its own column and row labels. These labels don't look at all like wxListCtrls column labels and makes my Grid control stick out like a sore thumb. Is there a way to bring these two controls into sync in terms of appearance? My first attempt at acheiving this involved overriding the paint message from the window retrieved by calling GetGridColLabelWindow(). This gives me control over appearance but I can't seem to replicate the look exactly. Can any one point to some code to replicate the look accurately.
On Windows it can be different depending on which version of the common controls DLL is in use, and on XP if themes are active then each theme can potentially draw them differently.
On Linux and OSX you can look in src/generic/listctrl.cpp.
Or is there a way that I can defer the rendering to windows with a flag or something?
No.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!