Re: How can I get a TextLineEdit object, and capture a key event?



On Sun, 2008-12-14 at 04:53 +0800, Kermit Mei wrote:
> Hello, I'm a newbie for gtkmm, in my program, I need a TextEdit which
> can just handle only one line text?
> 
> And I must capture the keyboard's event in it.
> 
> For example, when I press the key "5", it should show the text "%" but 
> not "5".

Gtk::Entry is such a one-line-text-editing widget. signal_insert_text()
(belonging to the Gtk::Editable base class) is emitted every time text
was inserted into the widget, so I think you can use it to replace
special characters by others.

> Thanks.
> Kermit Mei

Armin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]