Package pyforms :: Package gui :: Package Controls :: Module ControlBase :: Class ControlBase
[hide private]
[frames] | no frames]

Class ControlBase

source code


This class represents the most basic control that can exist A Control is a Widget or a group of widgets that can be reused from application to application

Instance Methods [hide private]
 
__init__(self, label='', defaultValue='', helptext='')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
initForm(self)
Load Control and initiate the events
source code
 
load(self, data)
Load a value from the dict variable
source code
 
save(self, data)
Save a value to dict variable
source code
 
show(self)
Show the control
source code
 
hide(self)
Hide the control
source code
 
addPopupMenuOption(self, label, functionAction=None, key=None)
Add an option to the Control popup menu
source code
 
addPopupSubMenuOption(self, label, options, keys={})
Add submenu options to the Control popup menu
source code
 
changed(self)
Function called when ever the Control value is changed
source code
 
aboutToShowContextMenuEvent(self)
Function called before open the Control popup menu
source code
 
__openPopupMenu(self, position) source code
 
enabled(self, value) source code
 
value(self, value)
This property return and set what the control should manage or store.
source code
 
name(self, value)
This property return and set the name of the control
source code
 
label(self, value)
Label of the control, if applies
source code
 
form(self)
Returns the Widget of the control.
source code
 
parent(self, value)
Returns or set the parent basewidget where the Control is
source code
 
help(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, label='', defaultValue='', helptext='')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

load(self, data)

source code 

Load a value from the dict variable

Parameters:
  • data - dictionary with the value of the Control

save(self, data)

source code 

Save a value to dict variable

Parameters:
  • data - dictionary with to where the value of the Control will be added

addPopupMenuOption(self, label, functionAction=None, key=None)

source code 

Add an option to the Control popup menu

Parameters:
  • label - label of the option.
  • functionAction - function called when the option is selected.
  • key - shortcut key

addPopupSubMenuOption(self, label, options, keys={})

source code 

Add submenu options to the Control popup menu

Parameters:
  • label - submenu label of the option.
  • options - dictionary representing the submenu. ex: { 'Example': event function, ... }.
  • keys - shortcut keys. ex: { 'Example': shortcut key, ... }.

enabled(self, value)

source code 
Parameters:
  • value (boolean)
Decorators:
  • @enabled.setter

value(self, value)

source code 

This property return and set what the control should manage or store.

Parameters:
  • value (string)
Decorators:
  • @value.setter

name(self, value)

source code 

This property return and set the name of the control

Parameters:
  • value (string)
Decorators:
  • @name.setter

label(self, value)

source code 

Label of the control, if applies

Parameters:
  • value (string)
Decorators:
  • @label.setter

form(self)

source code 

Returns the Widget of the control. This property will be deprecated in a future version.

Decorators:
  • @property

parent(self, value)

source code 

Returns or set the parent basewidget where the Control is

Parameters:
  • value (BaseWidget)
Decorators:
  • @parent.setter

help(self)

source code 
Decorators:
  • @property