.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\itom\ui\demoPropertyDialog.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_11_demos_itom_ui_demoPropertyDialog.py: Property dialog ================== .. GENERATED FROM PYTHON SOURCE LINES 5-37 .. code-block:: default from itom import ui gui = ui( "propertyDialog.ui", ui.TYPEDIALOG, ui.BUTTONBAR_HORIZONTAL, {"AcceptRole": "OK", "RejectRole": "Cancel"}, ) # pre-initialize values gui.spinValueA["value"] = 5 gui.spinValueB["value"] = 4.5 # show dialog and wait until it is closed (argument: 1 -> modal) ret = gui.show(1) if ret == 1: # evaluate your input print("ValueA:", gui.spinValueA["value"]) print("ValueB:", gui.spinValueB["value"]) if gui.radioItem1["checked"]: radioNr = 1 elif gui.radioItem2["checked"]: radioNr = 2 else: radioNr = 3 print("selected radio button:", radioNr) print("your text:", gui.txtText["text"]) else: print("the dialog has been rejected") .. _sphx_glr_download_11_demos_itom_ui_demoPropertyDialog.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demoPropertyDialog.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demoPropertyDialog.ipynb `