Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::Entry

class Gtk::Entry

The Gtk::Entry widget is a single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.

<URL:http://library.gnome.org/devel/gtk/stable/entry.png>

Class Methods

Gtk::Entry.new
Creates a new Gtk::Entry widget.

Instance Methods

activates_default?
Retrieves the value set by Gtk::Entry#activates_default=.
  • Returns: true if the entry will activate the default widget.
activates_default=(setting)
If setting is true, pressing Enter in the entry will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons. (For experts: if setting is true, the entry calls Gtk::Window#activate_default on the window containing the entry, in the default handler for the "activate" signal.)
  • setting: true to activate window's default widget on Enter keypress
  • Returns: setting.
set_activates_default(setting)
Same as Gtk::Entry#activates_default=.
  • setting: true to activate window's default widget on Enter keypress
  • Returns: self.
cursor_position
Retrieves the current cursor position. See Gtk::Editable#position.
editable?
Retrieves if the user can edit the text in the editable widget or not. See Gtk::Editable#editable?.
  • Returns: true if the user can edit the text, otherwise false.
editable=(editable)
Determines if the user can edit the text in the editable widget or not.
  • editable: true if the user can edit the text, otherwise false.
  • Returns: editable
set_editable(editable)
Same as Gtk::Entry#editable=.
  • editable: true if the user can edit the text, otherwise false.
  • Returns: self
has_frame?
Gets the value set by Gtk::Entry#has_frame=.
  • Returns: whether the entry has a beveled frame
has_frame=(setting)
Sets whether the entry has a beveled frame around it.
  • setting: new value
  • Returns: setting
set_has_frame(setting)
Same as Gtk::Entry#has_frame=.
  • setting: new value
  • Returns: setting
inner_border
This method returns the entry's inner-border property. See Gtk::Entry#inner_border= for more information. Since 2.10
  • Returns: the entry's Gtk::Border, or nil if none was set.
inner_border=(inner_border)
Sets entry's inner-border property to border, or clears it if nil is passed. The inner-border is the area around the entry's text, but inside its frame. If set, this property overrides the inner-border style property. Overriding the style-provided border is useful when you want to do in-place editing of some text in a canvas or list widget, where pixel-exact positioning of the entry is important. Sets the Border between text and frame. Overrides the inner-border style property. Since 2.10
  • inner_border: Gtk::Border between text and frame, otherwise nil. Overrides the inner-border style property
  • Returns: inner_border
set_inner_border(inner_border)
Same as inner_border=. Since 2.10
  • inner_border: Gtk::Border between text and frame, otherwise nil. Overrides the inner-border style property
  • Returns: self
invisible_char
Retrieves the character displayed in place of the real characters for entries with visibility set to false. See Gtk::Entry#invisible_char=.
  • Returns: the current invisible char, or 0, if the entry does not show invisible text at all.
invisible_char=(ch)
Sets the character to use in place of the actual text when Gtk::Entry#visibility= has been called to set text visibility to false. i.e. this is the character used in "password mode" to show the user how many characters have been typed. The default invisible char is an asterisk ('*'). If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
  • ch: a Unicode character(Number)
  • Returns: ch
set_invisible_char(ch)
Same as Gtk::Entry#invisible_char=
  • ch: a Unicode character(Number)
  • Returns: self
xalign
Gets the value set by Gtk::Entry#xalign=. Since 2.4
  • Returns: the alignment
xalign=(xalign)
Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry. Since 2.4
  • xalign: The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
  • Returns: xalign
set_xalign(xalign)
Same as Gtk::Entry#xalign=. Since 2.4
  • xalign: The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
  • Returns: self
layout
Gets the Pango::Layout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with Gtk::Entry#layout_offsets. The returned layout is owned by the entry so need not be freed by the caller.
layout_offsets
Obtains the position of the Pango::Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget. Also useful to convert mouse events into coordinates inside the Pango::Layout, e.g. to take some action if some part of the entry text is clicked. Note that as the user scrolls around in the entry the offsets will change; you'll need to connect to the "notify::scroll_offset" signal to track this. Remember when using the Pango::Layout methods you need to convert to and from pixels using Pango#pixels() or Pango::SCALE.
  • Returns: [x, y]
    • x: location to store X offset of layout, or nil
    • y: location to store Y offset of layout, or nil
max_length
Retrieves the maximum allowed length of the text in entry. See Gtk::Entry#max_length=.
  • Returns: the maximum allowed number of characters in Gtk::Entry, or 0 if there is no maximum.
max_length=(length)
Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.
  • length: the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.
  • Returns: length
set_max_length(length)
Same as Gtk::Entry#max_length=.
  • length: the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.
  • Returns: self
scroll_offset
Retrieves the number of pixels of the entry scrolled off the screen to the left.
  • Returns: the offset value.
selection_bound
Retrieves the position of the opposite end of the selection from the cursor in chars.
  • Returns: the position.
text
Retrieves the contents of the entry.
  • Returns: the contents of the entry.
text=(text)
Sets the contents of the entry.
  • text: the contents of the entry.
  • Returns: text
set_text(text)
Same as Gtk::Entry#text=.
  • text: the contents of the entry.
  • Returns: self
visibility?
Retrieves whether the text in entry is visible. See Gtk::Entry#visibility=.
  • Returns: true if the text is currently visible
visibility=(visible)
Sets whether the contents of the entry are visible or not. When visibility is set to false, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. The default invisible char is the asterisk '*', but it can be changed with Gtk::Entry#invisible_char=.
  • visible: true if the contents of the entry are displayed as plaintext.
  • Returns: visible
set_visibility(visible)
Same as Gtk::Entry#visibility=.
  • visible: true if the contents of the entry are displayed as plaintext.
  • Returns: self
width_chars
Gets the value set by Gtk::Entry#width_chars=.
  • Returns: number of chars to request space for, or negative if unset
width_chars=(n_chars)
Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.
  • n_chars : width in chars
  • Returns: n_chars
set_width_chars(n_chars)
Same as Gtk::Entry#width_chars=.
  • n_chars : width in chars
  • Returns: n_chars
completion
Returns the auxiliary completion object currently in use by entry. Since 2.4
completion=(completion)
Sets completion to be the auxiliary completion object to use with entry. All further configuration of the completion mechanism is done on completion using the Gtk::EntryCompletion API. Since 2.4
set_completion(completion)
Same as Gtk::Entry#completion=. Since 2.4
truncate_multiline?
Gets the value whether to truncate multiline pastes to one line. or not.
  • Returns: true if to truncate multiline pastes to one line.
truncate_multiline=(val)
Sets the value whether to truncate multiline pastes to one line. or not.
  • val: true if to truncate multiline pastes to one line.
  • Returns: val
set_truncate_multiline(val)
Same as truncate_multiline=.
  • val: true if to truncate multiline pastes to one line.
  • Returns: self
activate
  • Returns: self: FIXME
backspace
  • Returns: self: FIXME
copy_clipboard
  • Returns: self: FIXME
cut_clipboard
  • Returns: self: FIXME
delete_from_cursor
  • Returns: self: FIXME
delete_selection
See Gtk::Editable#delete_selection.
delete_text
See Gtk::Editable#delete_text.
editing_done
See Gtk::CellEditable#editing_done.
get_chars
See Gtk::Editable#get_chars.
insert_at_cursor
  • Returns: self: FIXME
insert_text
See Gtk::Editable#insert_text.
layout_index_to_text_index
  • Returns: self: FIXME
move_cursor
  • Returns: self: FIXME
paste_clipboard
  • Returns: self: FIXME
position
See Gtk::Editable#position.
position=
See Gtk::Editable#position=.
ref_accessible
See Atk::Implementor#ref_accessible.
remove_widget
See Gtk::CellEditable#remove_widget.
select_region
See Gtk::Editable#select_region.
selection_bounds
See Gtk::Editable#selection_bounds.
set_position
See Gtk::Editable#set_position.
set_shadow_type(shadow_type)
Same as shadow_type=.
  • shadow_type: Which kind of shadow to draw around the entry when has-frame is set
  • Returns: self
shadow_type
Gets the Which kind of shadow to draw around the entry when has-frame is set.
  • Returns: Which kind of shadow to draw around the entry when has-frame is set
shadow_type=(shadow_type)
Sets the Which kind of shadow to draw around the entry when has-frame is set.
  • shadow_type: Which kind of shadow to draw around the entry when has-frame is set
  • Returns: shadow_type
start_editing
See Gtk::CellEditable#start_editing.
text_index_to_layout_index
  • Returns: self: FIXME
toggle_overwrite
  • Returns: self: FIXME
add_child
See Gtk::Buildable#add_child.
construct_child
See Gtk::Buildable#construct_child.
get_internal_child
See Gtk::Buildable#get_internal_child.
name
See Gtk::Buildable#name.
name=
See Gtk::Buildable#name=.
set_buildable_property
See Gtk::Buildable#set_buildable_property.
set_name
See Gtk::Buildable#set_name.
buffer
Gets the Text buffer object which actually stores entry text.
  • Returns: Text buffer object which actually stores entry text
buffer=(buffer)
Sets the Text buffer object which actually stores entry text.
  • buffer: Text buffer object which actually stores entry text
  • Returns: buffer
builder_name
See Gtk::Buildable#builder_name.
builder_name=
See Gtk::Buildable#builder_name=.
caps_lock_warning=(caps_lock_warning)
Sets the value whether password entries will show a warning when Caps Lock is on or not.
  • caps_lock_warning: true if password entries will show a warning when Caps Lock is on
  • Returns: caps_lock_warning
caps_lock_warning?
Gets the value whether password entries will show a warning when Caps Lock is on or not.
  • Returns: true if password entries will show a warning when Caps Lock is on
cursor_hadjustment
  • Returns: self: FIXME
cursor_hadjustment=
  • Returns: self: FIXME
editing_canceled=
See Gtk::CellEditable#editing_canceled=.
editing_canceled?
See Gtk::CellEditable#editing_canceled?.
im_module
Gets the Which IM module should be used.
  • Returns: Which IM module should be used
im_module=(im_module)
Sets the Which IM module should be used.
  • im_module: Which IM module should be used
  • Returns: im_module
invisible_char_set=(invisible_char_set)
Sets the value whether the invisible char has been set or not.
  • invisible_char_set: true if the invisible char has been set
  • Returns: invisible_char_set
invisible_char_set?
Gets the value whether the invisible char has been set or not.
  • Returns: true if the invisible char has been set
overwrite_mode=(overwrite_mode)
Sets the value whether new text overwrites existing text or not.
  • overwrite_mode: true if new text overwrites existing text
  • Returns: overwrite_mode
overwrite_mode?
Gets the value whether new text overwrites existing text or not.
  • Returns: true if new text overwrites existing text
preedit_changed
  • Returns: self: FIXME
primary_icon_activatable=(primary_icon_activatable)
Sets the value whether the primary icon is activatable or not.
  • primary_icon_activatable: true if the primary icon is activatable
  • Returns: primary_icon_activatable
primary_icon_activatable?
Gets the value whether the primary icon is activatable or not.
  • Returns: true if the primary icon is activatable
primary_icon_gicon
Gets the GIcon for primary icon.
  • Returns: GIcon for primary icon
primary_icon_gicon=(primary_icon_gicon)
Sets the GIcon for primary icon.
  • primary_icon_gicon: GIcon for primary icon
  • Returns: primary_icon_gicon
primary_icon_name
Gets the Icon name for primary icon.
  • Returns: Icon name for primary icon
primary_icon_name=(primary_icon_name)
Sets the Icon name for primary icon.
  • primary_icon_name: Icon name for primary icon
  • Returns: primary_icon_name
primary_icon_pixbuf
Gets the Primary pixbuf for the entry.
  • Returns: Primary pixbuf for the entry
primary_icon_pixbuf=(primary_icon_pixbuf)
Sets the Primary pixbuf for the entry.
  • primary_icon_pixbuf: Primary pixbuf for the entry
  • Returns: primary_icon_pixbuf
primary_icon_sensitive=(primary_icon_sensitive)
Sets the value whether the primary icon is sensitive or not.
  • primary_icon_sensitive: true if the primary icon is sensitive
  • Returns: primary_icon_sensitive
primary_icon_sensitive?
Gets the value whether the primary icon is sensitive or not.
  • Returns: true if the primary icon is sensitive
primary_icon_stock
Gets the Stock ID for primary icon.
  • Returns: Stock ID for primary icon
primary_icon_stock=(primary_icon_stock)
Sets the Stock ID for primary icon.
  • primary_icon_stock: Stock ID for primary icon
  • Returns: primary_icon_stock
primary_icon_storage_type
Gets the representation being used for primary icon.
  • Returns: The representation being used for primary icon
primary_icon_tooltip_markup
Gets the contents of the tooltip on the primary icon.
  • Returns: The contents of the tooltip on the primary icon
primary_icon_tooltip_markup=(primary_icon_tooltip_markup)
Sets the contents of the tooltip on the primary icon.
  • primary_icon_tooltip_markup: The contents of the tooltip on the primary icon
  • Returns: primary_icon_tooltip_markup
primary_icon_tooltip_text
Gets the contents of the tooltip on the primary icon.
  • Returns: The contents of the tooltip on the primary icon
primary_icon_tooltip_text=(primary_icon_tooltip_text)
Sets the contents of the tooltip on the primary icon.
  • primary_icon_tooltip_text: The contents of the tooltip on the primary icon
  • Returns: primary_icon_tooltip_text
progress_fraction
Gets the current fraction of the task that's been completed.
  • Returns: The current fraction of the task that's been completed
progress_fraction=(progress_fraction)
Sets the current fraction of the task that's been completed.
  • progress_fraction: The current fraction of the task that's been completed
  • Returns: progress_fraction
progress_pulse_step
Gets the fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse().
  • Returns: The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse()
progress_pulse_step=(progress_pulse_step)
Sets the fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse().
  • progress_pulse_step: The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse()
  • Returns: progress_pulse_step
secondary_icon_activatable=(secondary_icon_activatable)
Sets the value whether the secondary icon is activatable or not.
  • secondary_icon_activatable: true if the secondary icon is activatable
  • Returns: secondary_icon_activatable
secondary_icon_activatable?
Gets the value whether the secondary icon is activatable or not.
  • Returns: true if the secondary icon is activatable
secondary_icon_gicon
Gets the GIcon for secondary icon.
  • Returns: GIcon for secondary icon
secondary_icon_gicon=(secondary_icon_gicon)
Sets the GIcon for secondary icon.
  • secondary_icon_gicon: GIcon for secondary icon
  • Returns: secondary_icon_gicon
secondary_icon_name
Gets the Icon name for secondary icon.
  • Returns: Icon name for secondary icon
secondary_icon_name=(secondary_icon_name)
Sets the Icon name for secondary icon.
  • secondary_icon_name: Icon name for secondary icon
  • Returns: secondary_icon_name
secondary_icon_pixbuf
Gets the Secondary pixbuf for the entry.
  • Returns: Secondary pixbuf for the entry
secondary_icon_pixbuf=(secondary_icon_pixbuf)
Sets the Secondary pixbuf for the entry.
  • secondary_icon_pixbuf: Secondary pixbuf for the entry
  • Returns: secondary_icon_pixbuf
secondary_icon_sensitive=(secondary_icon_sensitive)
Sets the value whether the secondary icon is sensitive or not.
  • secondary_icon_sensitive: true if the secondary icon is sensitive
  • Returns: secondary_icon_sensitive
secondary_icon_sensitive?
Gets the value whether the secondary icon is sensitive or not.
  • Returns: true if the secondary icon is sensitive
secondary_icon_stock
Gets the Stock ID for secondary icon.
  • Returns: Stock ID for secondary icon
secondary_icon_stock=(secondary_icon_stock)
Sets the Stock ID for secondary icon.
  • secondary_icon_stock: Stock ID for secondary icon
  • Returns: secondary_icon_stock
secondary_icon_storage_type
Gets the representation being used for secondary icon.
  • Returns: The representation being used for secondary icon
secondary_icon_tooltip_markup
Gets the contents of the tooltip on the secondary icon.
  • Returns: The contents of the tooltip on the secondary icon
secondary_icon_tooltip_markup=(secondary_icon_tooltip_markup)
Sets the contents of the tooltip on the secondary icon.
  • secondary_icon_tooltip_markup: The contents of the tooltip on the secondary icon
  • Returns: secondary_icon_tooltip_markup
secondary_icon_tooltip_text
Gets the contents of the tooltip on the secondary icon.
  • Returns: The contents of the tooltip on the secondary icon
secondary_icon_tooltip_text=(secondary_icon_tooltip_text)
Sets the contents of the tooltip on the secondary icon.
  • secondary_icon_tooltip_text: The contents of the tooltip on the secondary icon
  • Returns: secondary_icon_tooltip_text
set_buffer(buffer)
Same as buffer=.
  • buffer: Text buffer object which actually stores entry text
  • Returns: self
set_builder_name
See Gtk::Buildable#set_builder_name.
set_caps_lock_warning(caps_lock_warning)
Same as caps_lock_warning=.
  • caps_lock_warning: true if password entries will show a warning when Caps Lock is on
  • Returns: self
set_cursor_hadjustment
  • Returns: self: FIXME
set_editing_canceled
See Gtk::CellEditable#set_editing_canceled.
set_im_module(im_module)
Same as im_module=.
  • im_module: Which IM module should be used
  • Returns: self
set_invisible_char_set(invisible_char_set)
Same as invisible_char_set=.
  • invisible_char_set: true if the invisible char has been set
  • Returns: self
set_overwrite_mode(overwrite_mode)
Same as overwrite_mode=.
  • overwrite_mode: true if new text overwrites existing text
  • Returns: self
set_primary_icon_activatable(primary_icon_activatable)
Same as primary_icon_activatable=.
  • primary_icon_activatable: true if the primary icon is activatable
  • Returns: self
set_primary_icon_gicon(primary_icon_gicon)
Same as primary_icon_gicon=.
  • primary_icon_gicon: GIcon for primary icon
  • Returns: self
set_primary_icon_name(primary_icon_name)
Same as primary_icon_name=.
  • primary_icon_name: Icon name for primary icon
  • Returns: self
set_primary_icon_pixbuf(primary_icon_pixbuf)
Same as primary_icon_pixbuf=.
  • primary_icon_pixbuf: Primary pixbuf for the entry
  • Returns: self
set_primary_icon_sensitive(primary_icon_sensitive)
Same as primary_icon_sensitive=.
  • primary_icon_sensitive: true if the primary icon is sensitive
  • Returns: self
set_primary_icon_stock(primary_icon_stock)
Same as primary_icon_stock=.
  • primary_icon_stock: Stock ID for primary icon
  • Returns: self
set_primary_icon_tooltip_markup(primary_icon_tooltip_markup)
Same as primary_icon_tooltip_markup=.
  • primary_icon_tooltip_markup: The contents of the tooltip on the primary icon
  • Returns: self
set_primary_icon_tooltip_text(primary_icon_tooltip_text)
Same as primary_icon_tooltip_text=.
  • primary_icon_tooltip_text: The contents of the tooltip on the primary icon
  • Returns: self
set_progress_fraction(progress_fraction)
Same as progress_fraction=.
  • progress_fraction: The current fraction of the task that's been completed
  • Returns: self
set_progress_pulse_step(progress_pulse_step)
Same as progress_pulse_step=.
  • progress_pulse_step: The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse()
  • Returns: self
set_secondary_icon_activatable(secondary_icon_activatable)
Same as secondary_icon_activatable=.
  • secondary_icon_activatable: true if the secondary icon is activatable
  • Returns: self
set_secondary_icon_gicon(secondary_icon_gicon)
Same as secondary_icon_gicon=.
  • secondary_icon_gicon: GIcon for secondary icon
  • Returns: self
set_secondary_icon_name(secondary_icon_name)
Same as secondary_icon_name=.
  • secondary_icon_name: Icon name for secondary icon
  • Returns: self
set_secondary_icon_pixbuf(secondary_icon_pixbuf)
Same as secondary_icon_pixbuf=.
  • secondary_icon_pixbuf: Secondary pixbuf for the entry
  • Returns: self
set_secondary_icon_sensitive(secondary_icon_sensitive)
Same as secondary_icon_sensitive=.
  • secondary_icon_sensitive: true if the secondary icon is sensitive
  • Returns: self
set_secondary_icon_stock(secondary_icon_stock)
Same as secondary_icon_stock=.
  • secondary_icon_stock: Stock ID for secondary icon
  • Returns: self
set_secondary_icon_tooltip_markup(secondary_icon_tooltip_markup)
Same as secondary_icon_tooltip_markup=.
  • secondary_icon_tooltip_markup: The contents of the tooltip on the secondary icon
  • Returns: self
set_secondary_icon_tooltip_text(secondary_icon_tooltip_text)
Same as secondary_icon_tooltip_text=.
  • secondary_icon_tooltip_text: The contents of the tooltip on the secondary icon
  • Returns: self
text_length
Gets the Length of the text currently in the entry.
  • Returns: Length of the text currently in the entry

Properties

activates-default: true or false (Read/Write)
Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed
  • Default value: false
cursor-position: Integer (Read)
The current position of the insertion cursor in chars
  • Allowed values: [0,65535]
  • Default value: 0
editable: true or false (Read/Write)
Whether the entry contents can be edited
  • Default value: true
has-frame: true or false (Read/Write)
false removes outside bevel from entry
  • Default value: true
inner-border: Gtk::Border (Read/Write)
Border between text and frame. Overrides the inner-border style property Since 2.10
invisible-char: Integer (Read/Write)
The character to use when masking entry contents (in "password mode")
  • Default value: '*'
max-length: Integer (Read/Write)
Maximum number of characters for this entry. Zero if no maximum
  • Allowed values: [0,65535]
  • Default value: 0
scroll-offset: Integer (Read)
Number of pixels of the entry scrolled off the screen to the left
  • Allowed values: >= 0
  • Default value: 0
selection-bound: Integer (Read)
The position of the opposite end of the selection from the cursor in chars
  • Allowed values: [0,65535]
  • Default value: 0
text: String (Read/Write)
The contents of the entry
  • Default value: ""
truncate-multiline: true or false (Read/Write)
Whether to truncate multiline pastes to one line.
  • Default value: false
visibility: true or false (Read/Write)
false displays the "invisible char" instead of the actual text (password mode)
  • Default value: true
width-chars: Integer (Read/Write)
Number of characters to leave space for in the entry
  • Allowed values: >= -1
  • Default value: -1
xalign: Float (Read/Write)
The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts Since 2.4
  • Allowed values: [0,1]
  • Default value: 0
shadow-type: Gtk::ShadowType (Read/Write)
Which kind of shadow to draw around the entry when has-frame is set
buffer: Gtk::EntryBuffer (Read/Write)
Text buffer object which actually stores entry text
caps-lock-warning: true or false (Read/Write)
Whether password entries will show a warning when Caps Lock is on
im-module: String (Read/Write)
Which IM module should be used
invisible-char-set: true or false (Read/Write)
Whether the invisible char has been set
overwrite-mode: true or false (Read/Write)
Whether new text overwrites existing text
primary-icon-activatable: true or false (Read/Write)
Whether the primary icon is activatable
primary-icon-gicon: GIcon (Read/Write)
GIcon for primary icon
primary-icon-name: String (Read/Write)
Icon name for primary icon
primary-icon-pixbuf: Gdk::Pixbuf (Read/Write)
Primary pixbuf for the entry
primary-icon-sensitive: true or false (Read/Write)
Whether the primary icon is sensitive
primary-icon-stock: String (Read/Write)
Stock ID for primary icon
primary-icon-storage-type: Gtk::ImageType (Read)
The representation being used for primary icon
primary-icon-tooltip-markup: String (Read/Write)
The contents of the tooltip on the primary icon
primary-icon-tooltip-text: String (Read/Write)
The contents of the tooltip on the primary icon
progress-fraction: Float (Read/Write)
The current fraction of the task that's been completed
progress-pulse-step: Float (Read/Write)
The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse()
secondary-icon-activatable: true or false (Read/Write)
Whether the secondary icon is activatable
secondary-icon-gicon: GIcon (Read/Write)
GIcon for secondary icon
secondary-icon-name: String (Read/Write)
Icon name for secondary icon
secondary-icon-pixbuf: Gdk::Pixbuf (Read/Write)
Secondary pixbuf for the entry
secondary-icon-sensitive: true or false (Read/Write)
Whether the secondary icon is sensitive
secondary-icon-stock: String (Read/Write)
Stock ID for secondary icon
secondary-icon-storage-type: Gtk::ImageType (Read)
The representation being used for secondary icon
secondary-icon-tooltip-markup: String (Read/Write)
The contents of the tooltip on the secondary icon
secondary-icon-tooltip-text: String (Read/Write)
The contents of the tooltip on the secondary icon
text-length: Integer (Read)
Length of the text currently in the entry

Style Properties

inner-border: Gtk::Border (Read)
Border between text and frame. Since 2.10
icon-prelight: true or false (Read)
Whether activatable icons should prelight when hovered
invisible-char: Integer (Read)
The character to use when masking entry contents (in "password mode")
progress-border: Gtk::Border (Read)
Border around the progress bar
state-hint: true or false (Read)
Whether to pass a proper state when drawing shadow or background

Signals

activate: self
Emit when return key is pressed.
copy-clipboard: self
cut-clipboard: self
delete-from-cursor: self, delete_type, position
insert-at-cursor: self, text
Doesn't this work? (insert_text seems to do the job)
move-cursor: self, step, count, extend_selection
Emits when cursor(direction) keys are pressed.
  • self: Gtk::Entry
  • step: GtkMovementStep
  • count: Move count. +1 is order direction, -1 is opposite order.
  • extend_selection: true if it extends selection or false.
paste-clipboard: self
populate-popup: self, menu
Emits when right click on the Gtk::Entry.
toggle-overwrite: self
Emits when overwrite key is pressed.
backspace: self
icon-press: self
icon-release: self
preedit-changed: self

ChangeLog

  • 2007-03-01 Added methods for 2.10. - Masao
  • 2004-12-15 Added method for 2.4, improved Propeties section to show allowed/default values. - Masao
  • 2004-05-25 Added method for 2.4 - Masao
  • 2003-04-01 Initial upload - Masao