Package dtk :: Package ui :: Module entry :: Class TextEntry

Class TextEntry

source code


Text entry.

Instance Methods
 
__init__(self, content="", action_button=None, background_color=ui_theme.get_alpha_color("text_entry_background"), acme_color=ui_theme.get_alpha_color("text_entry_acme"), point_color=ui_theme.get_alpha_color("text_entry_point"), frame_point_color=ui_theme.get_alpha_color("text_entry_frame_point"), frame_color=ui_theme.get_alpha_color("text_entry_frame"))
Initialize InputEntry class.
source code
 
set_size(self, width, height)
Set text entry size with given value.
source code
 
set_editable(self, editable)
Set editable status of text entry.
source code
 
set_text(self, text)
Set text of text entry.
source code
 
get_text(self)
Get text of text entry.
source code
 
focus_input(self)
Focus input cursor.
source code
Class Variables
  __gsignals__ = {"action-active":(gobject.SIGNAL_RUN_LAST, gobj...
Method Details

__init__(self, content="", action_button=None, background_color=ui_theme.get_alpha_color("text_entry_background"), acme_color=ui_theme.get_alpha_color("text_entry_acme"), point_color=ui_theme.get_alpha_color("text_entry_point"), frame_point_color=ui_theme.get_alpha_color("text_entry_frame_point"), frame_color=ui_theme.get_alpha_color("text_entry_frame"))
(Constructor)

source code 

Initialize InputEntry class.

Parameters:
  • content - Initialize entry text, default is "".
  • action_button - Extra button add at right side of text entry, default is None.
  • background_color - Color of text entry background.
  • acme_color - Acme point color of text entry.
  • point_color - Pointer color of text entry.
  • frame_point_color - Frame pointer color of text entry.
  • frame_color - Frame color of text entry.

set_size(self, width, height)

source code 

Set text entry size with given value.

Parameters:
  • width - New width of text entry.
  • height - New height of text entry.

set_editable(self, editable)

source code 

Set editable status of text entry.

Parameters:
  • editable - Text entry can editable if option is True, else can't edit.

set_text(self, text)

source code 

Set text of text entry.

Parameters:
  • text - Text entry string.

get_text(self)

source code 

Get text of text entry.

Returns:
Return text of text entry.

Class Variable Details

__gsignals__

Value:
{"action-active":(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (str,)),\
}