Widget (hwx.gui)

Abstract base class for all widgets.

Public Methods

destroy (self)
enableGlobalActions (self, enable)
getMousePosition (self)
getRelativeMousePosition (self)
hide (self)
saveAsPng (self, fname)
setF1HelpTopic (self, helptopic)
setProperties (self, kwds)
show (self)

Property Details

active()

Returns True if it is visible and enabled, False otherwise. (readonly property)

advancedTooltip()

The advanced tooltip that appears while hovering mouse over widget.

children()

All widgets immediately contained by this one.

command()

Method called when the widget is activated or changed.

descendents()

All the widgets ultimately contained by this one.

enabled()

The availability of the widget.

Disabled widgets are greyed out and don’t respond to input events.

font()

The font used in this widget (set with font or dict).

height()

Fixed height of the widget.

layout()

The layout that contains this widget’s children.

maximumHeight()

The maximum allowable height inside the Layout.

maximumWidth()

The maximum allowable width inside the Layout.

minimumHeight()

The smallest allowable height inside the Layout.

minimumWidth()

The smallest allowable width inside the Layout.

name()

The unique identifier within a container.

parent()

The container that owns this widget.

size()

The fixed size of the widget (width, height).

tooltip()

The tooltip that appears while hovering mouse over widget.

value()

The value of the widget.

visible()

The visibility of the widget.

width()

The fixed width of the widget.

If a string or list of strings are specified, the width will be calculated from the longest string given the font.

Method Details

destroy(self)

Deletes this and all its children.

enableGlobalActions(self, enable)

Sets the state of Global Actions.

Disable the global actions to get key events.

param enable:Determines whether to enable or disable global actions.
type enable:bool
getMousePosition(self)

Returns the mouse position.

getRelativeMousePosition(self)

Returns the mouse position relative to this widget.

hide(self)

Hides the widget.

saveAsPng(self, fname)

Saves the widget as a .png file.

param fname:The file name for the .png
type fname:str
returns:True if it was saved succesfully, False otherwise.
rtype:bool
setF1HelpTopic(self, helptopic)

Popup web-browser helps when the user hits F1 when over this.

param helptopic:
 Topic name user needs help in.
type helptopic:str
setProperties(self, kwds)

Internal method called from constructors.

show(self)

Shows the widget.