f rom wrote:
1. I have a notebook with multiple tab each one
holding a styled text ctrl. How do I add a close box so I can close a tab ?
One way to do it is to put an icon on the tabs and catch the EVT_LEFT_DOWN event for the notebook. Then in the handler you can use the notebook's HitTest to find out which tab the mouse was clicked on and if it was clicked on the icon. If so then you remove that page, otherwise call event.Skip() so the notbook can do default processing of the mouse event.
2. I'd need a tree control like in windows explorer
but with an additional checkbox added to each line
preferable to the left of the name (so you can check
and uncheck individual folders, files). Is this
possible ?
It is possible, but tricky. There is nothing built-in to support this but you can simulate it by the images you use for each item. Simply create an icon that looks like an unchecked checkbox and one that looks like a checked checkbox. If you are already using icons on the tree items then you can build a set of combined images that have both the original icon and a checked/unchecked checkbox. Then you can watch for appropriate mouse clicks and use HitTest to find out the item it was clicked on and if the click was on the icon. If so then just toggle which icon is used for that item.
P.S. Maybe this would be a good next project for Andrea, a deirved class that automatically manages the combined original/checked/unchecked icons, making selections, etc.
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!