Package dtk :: Package ui :: Module dialog :: Class InputDialog

Class InputDialog

source code


Simple input dialog.

Instance Methods
 
__init__(self, title, init_text, default_width=330, default_height=145, confirm_callback=None, cancel_callback=None)
Initialize InputDialog class.
source code
 
focus_input(self, widget)
Grab focus on input entry.
source code

Inherited from DialogBox: get_mask_func

Inherited from window.Window: add_move_event, add_toggle_event, close_window, draw_mask, get_edge, get_shadow_size, hide_shadow, is_disable_window_maximized, min_window, resize_window, show_shadow, show_window, toggle_fullscreen_window, toggle_max_window

Method Details

__init__(self, title, init_text, default_width=330, default_height=145, confirm_callback=None, cancel_callback=None)
(Constructor)

source code 

Initialize InputDialog class.

Parameters:
  • title - Input dialog title.
  • init_text - Initialize input text.
  • default_width - Width of dialog, default is 330 pixel.
  • default_height - Height of dialog, default is 330 pixel.
  • confirm_callback - Callback when user click confirm button, this callback accept one argument that return by user input text.
  • cancel_callback - Callback when user click cancel button, this callback not need argument.
Overrides: window.Window.__init__

focus_input(self, widget)

source code 

Grab focus on input entry.

Parameters:
  • widget - InputDialog widget.