Is there any way to have a ListItem in a ListCtrl that looks/acts like a HyperLinkCtrl instead of like a StaticText line?
Thanks much,
-M
Is there any way to have a ListItem in a ListCtrl that looks/acts like a HyperLinkCtrl instead of like a StaticText line?
Thanks much,
-M
Looking at the demo, I notice that it includes a ListCtrl with built-in
editor. I also notice that the Grid demo includes one where it has
custom editors and renderers. It may be possible to add custom
renderers to the ListCtrl, but it certainly seems possible to add a
hyperlink to a Grid (whether you can pass enough options to the grid to
make it behave enough like a ListCtrl to be usable, I don't know).
- Josiah
Marc Hedlund <marc@precipice.org> wrote:
Is there any way to have a ListItem in a ListCtrl that looks/acts like a
HyperLinkCtrl instead of like a StaticText line?
Marc Hedlund wrote:
Is there any way to have a ListItem in a ListCtrl that looks/acts like a HyperLinkCtrl instead of like a StaticText line?
Putting child controls in a wx.ListCtrl is doable, but tricky as there is no built-in support for it so you need to manage their positions and sizes yourself so they align with the cells in the listctrl, etc. Add to that the possibility of scrolling and it can grow more complex.
I think that they way I would approach it is to just set the colour and font of the list items so they look like links, and then manage the mouse events from the listctrl so that you can do things like change the colour when the mouse rolls over it, change the cursor, etc.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!