Hello,
This compile failure is hard to understand (GTK3, gcc, Linux) :
static_cast<wxTextCtrl*> (aSearchCtrl);
According to the docs, wxSearchCtrl derives from wxTextCtrl, and should be able to cast to wxTextCtrl. Compile succeeds with dynamic_cast, but returns a NULL result.
Casting to wxControl or to wxTextEntry suceeds though, but it's not what I need.
Is there any workaround for this ? Some clarification at least.
Thanks in advance.
wxSearchCtrl : cast to wxTextCtrl fails to compile
Re: wxSearchCtrl : cast to wxTextCtrl fails to compile
The documentation is outdated.
What exactly do you want to do?
On platforms where a native implementation exists, wxSearchCtrl does not derive from wxTextCtrl.This control is implemented natively under macOS and GTK 3.6 or later and generically for all the other platforms.
What exactly do you want to do?
Use the source, Luke!
Re: wxSearchCtrl : cast to wxTextCtrl fails to compile
OK, I didn't fully grasp the meaning of 'generically implemented'.
I'm using wxTextCompleterSimple on a few wxTextCtrl controls, and wished to use wxSearchCtrl instead, mainly because of the cancel button. Unfortunately, wxTextCtrl does not provide a cancel button.
It's not a real problem, was just surprising. wxTextCtrl is good enough.
Thanks.
I'm using wxTextCompleterSimple on a few wxTextCtrl controls, and wished to use wxSearchCtrl instead, mainly because of the cancel button. Unfortunately, wxTextCtrl does not provide a cancel button.
It's not a real problem, was just surprising. wxTextCtrl is good enough.
Thanks.