Page 2 of 2

Re: WxtextCtrl focux in LInux

Posted: Mon Jul 02, 2018 10:01 am
by DavidHart
I've tested your altered 'minimal' sample here (LXDE on debian stretch). It probably worked as intended, but the pop-up panel is blank so it's hard to be sure. I therefore added a statictext:

Code: Select all

PanelPopUp::PanelPopUp(wxWindow *window):wxPanel(window)
{
	
	this->SetSize(500,500);
  wxStaticText* st = new wxStaticText(this, wxID_ANY, "Test");
  wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
  sizer->Add(st, 1, wxEXPAND);
  SetSizer(sizer);
	
}
(Note the use of code-tags.)

I can now see the word 'Test' when I type.

Is that what happens for you? If so, please explain why you think you have a problem. If not, please give a full description of your setup e.g. your desktop environment, distro and version.

In your real code you said you use wxMiniFrame. That is a much better choice than wxPanel, which is not a proper top-level window. Perhaps you should have used a wxMiniFrame in the code you attached...

Re: WxtextCtrl focux in LInux

Posted: Mon Jul 02, 2018 2:24 pm
by ONEEYEMAN
Hi,
Could you please follow David's instruction and just insert the unified diff inside the "code" tags?

Thank you.

Re: WxtextCtrl focux in LInux

Posted: Mon Jul 09, 2018 6:20 am
by Mounika
Use wxpanel in place of wxminiframe , focus of the text control is working properly