Gtk2::EntryBuffer(3) User Contributed Perl Documentation Gtk2::EntryBuffer(3)

Gtk2::EntryBuffer - wrapper for GtkEntryBuffer

Glib::Object
+----Gtk2::EntryBuffer

The Gtk2::EntryBuffer class contains the actual text displayed in a Gtk2::Entry widget.

A single Gtk2::EntryBuffer object can be shared by multiple Gtk2::Entry widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.

Gtk2::EntryBuffer may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable memory, useful in the case of important passwords. Or a derived class could integrate with an application's concept of undo/redo.

$initial_chars (string)

integer = $buffer->delete_text ($position=0, $n_chars=-1)

  • $position (integer)
  • $n_chars (integer)

$buffer->emit_deleted_text ($position, $n_chars)

  • $position (integer)
  • $n_chars (integer)

$buffer->emit_inserted_text ($position, $chars, $n_chars)

  • $position (integer)
  • $chars (string)
  • $n_chars (integer)

$buffer->insert_text ($position, $chars)

  • $position (integer)
  • $chars (string)

integer = $buffer->get_length

integer = $buffer->get_max_length

$buffer->set_max_length ($max_length)

$max_length (integer)

$buffer->set_text ($chars)

$chars (string)

'length' (Glib::UInt : default 0 : readable / private / static-nick / static-blurb)
Length of the text currently in the buffer
'max-length' (integer : default 0 : readable / writable / private / static-nick / static-blurb)
Maximum number of characters for this entry. Zero if no maximum
'text' (string : default "" : readable / writable / private / static-nick / static-blurb)
The contents of the buffer

Gtk2, Glib::Object

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

2022-05-29 perl v5.36.0