GtkLayout problem?



Hello,

On my application I have a class that derives from Gtk::Layout.
In the on_button_press_event, I need to create a text entry box where the
mouse is clicked. i.e. I use

put(textEntryBox, (int)event->x, (int)event->y);
textEntryBox.grab_focus();
textEntryBox.show();

This works just fine. But if my Gtk::Layout is scrolled to another area.
i.e. after I call,
get_vadjustment()->set_value(2000); // some line number such as 2000

when
put(textEntryBox, (int)event->x, (int)event->y);
is invoked

The viewport of Gtk::Layout always jump to a certain area, I'm guessing it's
linenumber 0.

Does anybody know this is a known problem or have any idea?

Thanks,
Andy



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