Gnumed.wxpython.gmResizingWidgets.cResizingWindow

Package Gnumed :: Package wxpython :: Module gmResizingWidgets :: Class cResizingWindow |
[frames] | no frames]

# Class cResizingWindow

source code

    wx.ScrolledWindow --+
                        |
                       cResizingWindow

A vertically-scrolled window which allows subwindows to change their size, and adjusts accordingly.

Instance Methods
__init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize) | source code
AddWidget(self, widget, label=None) Adds a widget, optionally with label | source code
Newline(self) Starts a newline on the widget | source code
DoLayout(self) Overridden by descendants, this function uses AddWidget and Newline to form the outline of the widget | source code
ReSize(self, widget, new_height) Called when a child widget has a new height, redoes the layout. | source code
EnsureVisible(self, widget, cur_x=0, cur_y=0) Ensures widget is visible | source code
SetValue(self, values) Runs SetValue() on all the fields | source code
GetValue(self) Return dict of values of inner widgets. | source code
Clear(self) Clears all widgets where this makes sense | source code
SetFocus(self) | source code
GetPickList(self, callback, x_intended, y_intended) Returns a pick list, destroying a pre-existing pick list for this widget | source code
GetSummary(self) Gets a terse summary string for the data in the widget | source code

Method Details

### AddWidget(self, widget, label=None) | source code
Adds a widget, optionally with label Parameters: `label` (string) - text of the label `widgets` (wx.Window descendant)

### EnsureVisible(self, widget, cur_x=0, cur_y=0) | source code
Ensures widget is visible Parameters: `widget` - a child widget `cur_x` (integer) - the X co-ordinate of the cursor inside widget, if applicable `cur_y` (integer) - the Y co-ordinate of the cursor inside widget

### SetValue(self, values) | source code
Runs SetValue() on all the fields Parameters: `values` (dictionary) - keys are the labels, values are passed to SetValue()

### GetValue(self) | source code
Return dict of values of inner widgets. Returns a dictionary of the results of GetValue() called on all widgets, keyed by label Unlabelled widgets don't get called

### GetPickList(self, callback, x_intended, y_intended) | source code
Returns a pick list, destroying a pre-existing pick list for this widget the alive member is true until the object is Destroy ()'ed Parameters: `callback` (callable) - called when a item is selected, `x_intended` (int) - the X-position where the list should appear `x` - the Y-position where the list should appear `y_intended` (int) Returns: PickList