Package wx :: Package lib :: Package agw :: Module pycollapsiblepane
[frames | no frames]

Module wx.lib.agw.pycollapsiblepane

Description

A collapsible pane is a container with an embedded button-like control which can be used by the user to collapse or expand the pane's contents. Once constructed you should use the GetPane() function to access the pane and add your controls inside it (i.e. use the window returned from GetPane as the parent for the controls which must go in the pane, NOT the PyCollapsiblePane itself!).

Note that because of its nature of control which can dynamically (and drastically) change its size at run-time under user-input, when putting PyCollapsiblePane inside a wx.Sizer you should be careful to add it with a proportion value of zero; this is because otherwise all other windows with non-null proportion values would automatically get resized each time the user expands or collapse the pane window resulting usually in a weird, flickering effect.

Usage Sample

collpane = PyCollapsiblePane(self, -1, "Details:")

# add the pane with a zero proportion value to the 'sz' sizer which contains it sz.Add(collpane, 0, wx.GROW|wx.ALL, 5)

# now add a test label in the collapsible pane using a sizer to layout it: win = collpane.GetPane() paneSz = wx.BoxSizer(wx.VERTICAL) paneSz.Add(wx.StaticText(win, -1, "test!"), 1, wx.GROW|wx.ALL, 2) win.SetSizer(paneSz) paneSz.SetSizeHints(win)

License And Version:

PyCollapsiblePane is freeware and distributed under the wxPython license.

Latest Revision: Andrea Gavana @ 15 Oct 2008, 22.30 GMT Version 0.1


Classes
GTKExpander  
PyCollapsiblePane  

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:33 2009 http://epydoc.sf.net