logo       

faking an editable clist: msg#00024

gnome.gtk+.perl

Subject: faking an editable clist

I have an interface that sort of works, by putting up a 2-column clist
with tags in the first column and values in the second... select-row
copies the tag and value into a pair of Gnome::Entry widgets, where they
can be editted. Then I use the 'changed' signal on the value Entry to
force an update of the CList... sort of like a spreadsheet would
behave, except for all the moving around of focus (which the user does
manually. ick.)

In order to improve this, without having to invent my own clist
replacement, I thought I'd fake it by forwarding [some subset of]
key_press_event and key_release_event messages from the Gtk::CList to
the Gtk::Entry. Unfortunately, it doesn't work... all I'm doing (in
the key_press_event handler for the CList) is setting $event->{window}
to the entry->window and calling Gtk::Gdk->event_put on it to feed it
back in. This does seem to trigger an explicit handler, if I set one
up... but the actual entry doesn't seem to pay any attention to it.

Suggestions? Or do I need to trace through how this would work in C
and try to work backwards from there?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise