Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xrc subclass question

11 views
Skip to first unread message

Troels

unread,
Nov 10, 2009, 4:01:16 AM11/10/09
to
Hi

I have this xrc object working

cpp: class MyCaption : public wxStaticText {};
xrc: <object class="wxStaticText" name="caption" subclass="MyCaption">
</object>

But, if I change the base class to wxControl, xrc fails to instantiate
the class.

cpp: class MyCaption : public wxControl {};
xrc: <object class="wxControl" name="caption" subclass="MyCaption">
</object>

Apparantly xrc doesn't like wxControl as base class or??

Thanks
Troels

Troels

unread,
Nov 10, 2009, 6:21:56 AM11/10/09
to

Troels

unread,
Nov 10, 2009, 6:25:04 AM11/10/09
to

Troels

unread,
Nov 10, 2009, 7:07:32 AM11/10/09
to

Vadim Zeitlin

unread,
Nov 11, 2009, 9:55:57 AM11/11/09
to

No, there is no XRC handler for a wxControl (and it wouldn't make much
sense to have one AFAICS, what would it do?).

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Troels

unread,
Nov 11, 2009, 10:14:36 AM11/11/09
to
>> I have this xrc object working
>>
>> cpp: class MyCaption : public wxStaticText { DECLARE_DYNAMIC_CLASS(MyCaption) };

>> xrc:<object class="wxStaticText" name="caption" subclass="MyCaption">
>> </object>
>>
>> But, if I change the base class to wxControl, xrc fails to instantiate
>> the class.
>>
>> cpp: class MyCaption : public wxControl { DECLARE_DYNAMIC_CLASS(MyCaption) };

>> xrc:<object class="wxControl" name="caption" subclass="MyCaption">
>> </object>
>>
>> Apparantly xrc doesn't like wxControl as base class or??
>
> No, there is no XRC handler for a wxControl (and it wouldn't make much
> sense to have one AFAICS, what would it do?).
>
> Regards,
> VZ

I suppose not. Do I really have to write a new xrc handler then, for
MyCaption, in the case of not deriving from a stock widget?

Thanks
Troels

0 new messages