How to use specific methods with a generic widget pointer?



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’

Thanks in advance,
Paulo Flabiano Smorigo


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