Re: How to use specific methods with a generic widget pointer?
- From: Paulo Flabiano Smorigo <pfsmorigo gmail com>
- To: Guillaume Brocker <guillaume brocker digital-trainers 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 11:58:36 -0300
On Tue, Mar 17, 2009 at 11:40, Guillaume Brocker
<guillaume brocker digital-trainers com> wrote:
> 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
>
Hi Guillaume,
Thanks for the fast reply...
I know that the Gtk::Widget don't have the set_active() member but as
it is pointing to a ToggleButton widget, isn't it possible to use the
method?
I there a someway to make the pointer accept the method?
Thanks...
Paulo Flabiano Smorigo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]