================= SpinBox (hwx.gui) ================= A SpinBox Widget. SpinBox allows to choose a value by clicking the up/down buttons or pressing up/down on the keyboard to increase/decrease the displayed value. The upper and lower bounds are defined by the min and max properties. The user can also type the value manually. The SpinBox supports integer values and invokes the callback command every time the value is changed. Inherits: - :ref:`Widget (hwx.gui)` ---------- Properties ---------- +---------+---------+---------+ | max_ | min_ | prefix_ | +---------+---------+---------+ | step_ | suffix_ | | +---------+---------+---------+ -------------- Public Methods -------------- +-------------------------------------+ | addChildren_ (self, children) | +-------------------------------------+ | destroy_ (self) | +-------------------------------------+ | enableGlobalActions_ (self, enable) | +-------------------------------------+ | getMousePosition_ (self) | +-------------------------------------+ | getRelativeMousePosition_ (self) | +-------------------------------------+ | hide_ (self) | +-------------------------------------+ | saveAsPng_ (self, fname) | +-------------------------------------+ | setF1HelpTopic_ (self, helptopic) | +-------------------------------------+ | setProperties_ (self, kwds) | +-------------------------------------+ | setValue_ (self, value) | +-------------------------------------+ | show_ (self) | +-------------------------------------+ ---------------- Property Details ---------------- .. _max: .. property:: max The maximum integer value. .. _min: .. property:: min The minimum integer value. .. _prefix: .. property:: prefix The text that appears before the int. .. _step: .. property:: step The value by which SpinBox is increased/decreased when you click the arrows. .. _suffix: .. property:: suffix The text that appears after the int. -------------- Method Details -------------- .. _addChildren: .. method:: addChildren(self, children) Add child widgets/layouts into this widget. Widget children get layed out using a VBoxLayout. Typically, you'll pass the parent/children into the constructor instead of calling this function directly. :param children: :type children: list[Widget] | Layout .. _destroy: .. method:: destroy(self) Deletes this and all its children. .. _enableGlobalActions: .. method:: 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: .. method:: getMousePosition(self) Returns the mouse position. .. _getRelativeMousePosition: .. method:: getRelativeMousePosition(self) Returns the mouse position relative to this widget. .. _hide: .. method:: hide(self) Hides the widget. .. _saveAsPng: .. method:: 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: .. method:: 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: .. method:: setProperties(self, kwds) Internal method called from constructors. .. _setValue: .. method:: setValue(self, value) Sets the specified value after converting it into an integer. :param value: The numeric value to be set for the SpinBox. :type value: int .. _show: .. method:: show(self) Shows the widget.