Generic wxWidgets

Post here wxCrafter related issues / features / bugs
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Generic wxWidgets

Post 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

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Generic wxWidgets

Post 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
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Generic wxWidgets

Post 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

CodeLite 15.x
CodeLite is awesome, I just Love it!

Post Reply