extools.ui¶
-
class
extools.ui.
ExUI
(title='exui')[source]¶ Bases:
object
An enhanced UI class for extender.
ExUI
adds additional helpers to the standard Extender UI class.-
BUTTON_SPACE
= 150¶
-
BUTTON_WIDTH
= 1065¶
-
FILE_DIALOG_FILTERS
= {'excel': ('Microsoft Excel File (*.xls, *.xlsx)|*.xls*|All Files (*.*)|*.*',)}¶
-
FINDER_BUTTON_TYPE
= 4¶
-
finder_on_click_for
(view, ok_callback, cancel_callback, _filter='', display_fields='1', return_fields='1')[source]¶ Build a callback to execute on finder button click.
Parameters: - view (str) – The view name (either custom or built in) to find across.
- ok_callback (func) – Callback to execute on user OK
- cancel_callback (func) – Callback to execute on user cancel
- _filter (str) – Filter to apply to finder records.
- display_fields (str (comma separated indexes)) – fields to display in finder
- return_fields (str (comma separated indexes)) – fields to display in finder
Returns: finder_on_click callback function
-
get_browse_click_callback
(field, title='Select File', _filter='')[source]¶ Create the browse button callback in a closure to pass the field.
Create a compound field with an input field and a button:
+-------------------------+ +----------+ caption | <input field> | | <button> | +-------------------------+ +----------+
Parameters: - caption (str) – input field caption
- callback (function) – callback function for the button
- default (str) – default value for the input field
- label (str) – label for the button
Returns: (input_field, button)
Return type: (accpac.UIField, accpac.UIButton)
To create a file browse input and button:
file_path_fld, file_browse_btn = self.input_with_button( "File", self.on_browse_click, label="Browse")
-