================ Dialog (hwx.gui) ================ A top-level window mostly used for short-term tasks and brief communications with the user. Inherits: - :ref:`Container (hwx.gui)` ---------- Properties ---------- +-----------+-----------+ | caption_ | position_ | +-----------+-----------+ -------------- Public Methods -------------- +------------------------------------------------------------------+ | accept_ (self, returnValue) | +------------------------------------------------------------------+ | addChildren_ (self, children) | +------------------------------------------------------------------+ | createContents_ (self) | +------------------------------------------------------------------+ | exec_ (self) | +------------------------------------------------------------------+ | positionUnder_ (self, relativeTo, checkWasMoved=True, xoffset=0) | +------------------------------------------------------------------+ | reject_ (self) | +------------------------------------------------------------------+ | show_ (self) | +------------------------------------------------------------------+ ---------------- Property Details ---------------- .. _caption: .. property:: caption The text displayed in the titlebar. .. _position: .. property:: position The location within the main window. -------------- Method Details -------------- .. _accept: .. method:: accept(self, returnValue) Close the dialog and returnValue from exec. .. _addChildren: .. method:: addChildren(self, children) Adds widgets to the container. :param children: The widget or list of widgets to be added. :type children: list[Widget] .. _createContents: .. method:: createContents(self) To be implemented in derived class. .. _exec: .. method:: exec(self) Show as a model dialog, blocking code execution until it is closed. This is typically used to get user input before continuing. Dialog code returns the input from exec by calling self.accept(value). :returns: The accepted value or None if the dialog is closed in any other way. .. _positionUnder: .. method:: positionUnder(self, relativeTo, checkWasMoved=True, xoffset=0) Positions the dialog under or over the relataveTo widget. :param relativeTo: The widget to position relative to. :type relativeTo: Widget :param checkWasMoved: Determines whether to check if widget is moved or not. :type checkWasMoved: bool :param xoffset: The offset value for the widget for x-axis. :type xoffset: int .. _reject: .. method:: reject(self) Syntactic sugar to close the exec dialog without accepting a value. None is returned from exec. .. _show: .. method:: show(self) Shows the dialog and continues with script execution.