Re: [gtkmm] how to use te signal_focus ?
- From: Daniel Elstner <daniel elstner gmx net>
- To: Bart Hakvoort <bart hakvoort castel nl>
- Cc: gtkmm-main <gtkmm-list gnome org>
- Subject: Re: [gtkmm] how to use te signal_focus ?
- Date: 15 Oct 2002 22:10:31 +0200
Am Die, 2002-10-15 um 21.42 schrieb Bart Hakvoort:
> I need to check if a Treeview had te focus or not and if it get the
> focus i need to know it. So my question is: how do i connect a
> signal_focus to a treeview ?
Gtk::Widget::has_focus() tells you whether the widget has the focus. To
get notification on focus changes, you should probably connect to
Gtk::Widget::signal_focus_in_event() -- but I never used it, look up the
GTK+ documentation for details.
Connecting to a signal is easy:
foo_widget->signal_bar().connect(
SigC::slot(*this, &FuzzClass::bazz_method));
*this can actually be a reference to any object derived from
SigC::Object. If you derive from the widget that provides the signal
you can alternatively override the corresponding on_bar() method
instead.
> and another request ;) does anyone have an extended Treeview code? i
> have my own ( simple ) treeview now, but i like to do some more
> sophisticated things with it. And an example might come in handy
You won't see any example code until you tell us what "extended TreeView
code" is supposed to be ;)
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]