Whenever I click on some customized wxTextCtrl then click somewhere else, I can't click back to once clicked customized wxTextCtrl.
The focus stays where it was before re-clicking.
The cursor position also mimics the box which should be focused.
What could cause this problem?
Code: Select all
#ifndef TextCtrl_Short_h
#define TextCtrl_Short_h
class TextCtrl_Short : public wxTextCtrl
{
public:
TextCtrl_Short(wxWindow*, string, short*);
/* Events */
void OnKillFocus(wxFocusEvent& Event);
/* Member Variables */
short * Container;
void * ParentContainer;
bool NoLoadList;
};
#endif
TextCtrl_Short::TextCtrl_Short(wxWindow * parent, string InitValue, short * Pointer)
: wxTextCtrl(parent, wxID_ANY, InitValue, wxDefaultPosition, wxSize(0, 20), 0, wxDefaultValidator)
{
Container = Pointer;
this->SetBackgroundColour(wxColour(210, 230, 255));
Connect(this->GetId(), wxEVT_KILL_FOCUS, wxFocusEventHandler(TextCtrl_Short::OnKillFocus));
}