Page 1 of 1

Generic wxWidgets

Posted: Fri Sep 04, 2015 6:32 pm
by evstevemd
While I can create them as Custom Widgets, I wanted to know if they will ever make it up into wxC.
AFAICS, they have same API as their other part (or at least wxListCtrl which I have tested), which could make it easier to have a flag to specify whether It is generic or not.

Question: Will they make it into wxC?
Thanks

Re: Generic wxWidgets

Posted: Sat Sep 05, 2015 8:47 am
by eranif
If your widget has the same API as its wxWidgets counterpart you should use the "Subclass" feature.

For example, if you have a MySpinCtrl which has the same API (especially the ctor signature) you can tell wxCrafter to use MySpinCtrl instead of wxSpinCtrl by populating the
subclass properties of the control. You should specify the alternate class name to use (e.g. "MySpinCtrl") and the header file (e.g. "MySpinCtrl.h")

For this to work, your subclass must have the same ctor signature as the wxWidgets's one

See this answer: http://forums.codelite.org/viewtopic.ph ... 073#p13891

Eran

Re: Generic wxWidgets

Posted: Sat Sep 05, 2015 8:20 pm
by evstevemd
eranif wrote:If your widget has the same API as its wxWidgets counterpart you should use the "Subclass" feature.

For example, if you have a MySpinCtrl which has the same API (especially the ctor signature) you can tell wxCrafter to use MySpinCtrl instead of wxSpinCtrl by populating the
subclass properties of the control. You should specify the alternate class name to use (e.g. "MySpinCtrl") and the header file (e.g. "MySpinCtrl.h")

For this to work, your subclass must have the same ctor signature as the wxWidgets's one

See this answer: http://forums.codelite.org/viewtopic.ph ... 073#p13891

Eran
Great as usual
Thank you

Sent from my TECNO H6 using Tapatalk