new pages and choicebook

Hi,

I’m trying to implement ‘pages’ for displaying text. I’ve had a look at the choicebook, but I would prefer to choose the pages with a spin control. Can anyone offer any help as to how to achieve this? Is it possible to alter the choicebook.py itself?

Thanks,

Malcolm

M Clift wrote:

Hi,

I'm trying to implement 'pages' for displaying text. I've had a look at the choicebook, but I would prefer to choose the pages with a spin control. Can anyone offer any help as to how to achieve this? Is it possible to alter the choicebook.py itself?

No, it is C++ code.

The correct way to do this would be to derive a new class from the wxBookCtrl base class and override the proper methods, but that is not possible yet as I havn't created a wx.PyBookCtrl class that is Python-aware and able to reflect the virtual method calls to Python methods in the derived class. On the other hand, it would not be hard at all to roll your own without the wx.PyBookCtrl base class. You would just need to manage the layout and showing/hiding of the page windows in response to the SpinCtrl's events.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!