Package gui :: Package analyses :: Package elements :: Module text_element :: Class Text_ctrl
[hide private]
[frames] | no frames]

Class Text_ctrl

source code

The analysis specific text control.

This consists of three elements: wx.StaticText, wx.TextCtrl, and wx.Button.

Instance Methods [hide private]
 
__init__(self, box, parent, text='', default='', tooltip=None, tooltip_button=None, button_text=' Change', control=<class 'wx._controls.TextCtrl'>, icon=u'/data/relax/tags/3.0.2/graphics/oxygen_icons/16x16/actions/d..., fn=None, editable=True, button=False, width_text=200, width_button=80, spacer=0)
Create a text selection element for the frame.
source code
 
Enable(self, enable=True)
Enable or disable the element for user input.
source code
int
GetValue(self)
Set the value of the control.
source code
 
SetValue(self, value)
Set the value of the control.
source code
Method Details [hide private]

__init__(self, box, parent, text='', default='', tooltip=None, tooltip_button=None, button_text=' Change', control=<class 'wx._controls.TextCtrl'>, icon=u'/data/relax/tags/3.0.2/graphics/oxygen_icons/16x16/actions/d..., fn=None, editable=True, button=False, width_text=200, width_button=80, spacer=0)
(Constructor)

source code 

Create a text selection element for the frame.

This consists of a horizontal layout with a static text element, a text control, and an optional button.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the structure file selection GUI element into.
  • parent (wx object) - The parent GUI element.
  • text (str) - The static text.
  • default (str) - The default text of the control.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • tooltip_button (str) - The separate tooltip for the button.
  • button_text (str) - The text to display on the button.
  • control (wx.TextCtrl derived class) - The control class to use.
  • icon (str) - The path of the icon to use for the button.
  • fn (func or str) - The function or method to execute when clicking on the button. If this is a string, then an equivalent function will be searched for in the control object.
  • editable (bool) - A flag specifying if the control is editable or not.
  • button (bool) - A flag which if True will cause a button to appear.
  • width_text (int) - The width of the text element.
  • width_button (int) - The width of the button.
  • spacer (int) - The horizontal spacing between the elements.

Enable(self, enable=True)

source code 

Enable or disable the element for user input.

Parameters:
  • enable (bool) - The flag specifying if the element should be enabled or disabled.

GetValue(self)

source code 

Set the value of the control.

Returns: int
The value of the text control.

SetValue(self, value)

source code 

Set the value of the control.

Parameters:
  • value (text) - The value to set the text control to.