Re: How to use specific methods with a generic widget pointer?
- From: Guillaume Brocker <guillaume brocker digital-trainers com>
- To: Paulo Flabiano Smorigo <pfsmorigo gmail com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: How to use specific methods with a generic widget pointer?
- Date: Tue, 17 Mar 2009 15:40:58 +0100
Paulo Flabiano Smorigo a écrit :
Hello,
What can I do to solve the following error? I need to use a different
kind of pointer?
The code:
Gtk::ToggleButton btnOK;
Gtk::Widget *ptrElement = NULL;
ptrElement = &btnOK;
ptrElement->set_active(true);
The error:
error: ‘class Gtk::Widget’ has no member named ‘set_active’
Gtk::Widget has no member ‘set_active’. This member is specific to
Gtk::ToggleButton and derived classes. Wy don't you call
‘btnOK.set_active’ directly ?
Thanks in advance,
Paulo Flabiano Smorigo
Guillaume
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]