Search found 201 matches

by gtafan
Tue Jan 22, 2019 3:40 pm
Forum: C++ Development
Topic: problem geting values from TextCtrl
Replies: 5
Views: 1375

problem geting values from TextCtrl

So here my main code from cpp files: MyPanel implementation //(*IdInit(MyPanel) const long MyPanel::ID_STATICTEXT1 = wxNewId(); const long MyPanel::ID_TEXTCTRL1 = wxNewId(); //*) BEGIN_EVENT_TABLE(MyPanel,wxPanel) //(*EventTable(MyPanel) //*) END_EVENT_TABLE() MyPanel::MyPanel(wxWindow* parent, cons...
by gtafan
Fri Jan 18, 2019 11:56 am
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Lose focus event for wxTextCtrl?

[quote="PB"][/quote] Sorry a misunderstanding, the problem with tab has nothing to do with my previous one. When I am presing tab on any textCtrl the cursor goes to the next textCtrl and Lose focus event is generated, but on the last textCtrl it´s not worcking, the cursor is not going to t...
by gtafan
Wed Jan 16, 2019 2:13 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Lose focus event for wxTextCtrl?

What do you mean by "problems to acces the textCtrl"? Do you mean that the user cannot set focus to the control with keyboard and/or mouse? Do you call event.Skip() in the wxEVT_KILL_FOCUS handler (see my previous code)? Can you reproduce the issue with the MyDialog code below? #include <...
by gtafan
Tue Jan 15, 2019 3:26 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Lose focus event for wxTextCtrl?

Since I have more then 1 textCtrl, I am geting problems to acces the textCtrl again once it lost focus. After comenting out this line:

Code: Select all

textCtrl->Bind(wxEVT_KILL_FOCUS, &MyDialog::OnKillFocus, this);
everithing worcks fine again.
by gtafan
Mon Jan 07, 2019 2:32 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Re:

So it was really Connect(), that cased the problem? No, the problem was as both David and me wrote: You changed the control on which the method (Connect) is called, from wxTextCtrl to (probably) its parent. If you did the same to Bind(), it would be wrong as well. OK, now I see, normaly wxSmith doe...
by gtafan
Mon Jan 07, 2019 1:28 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Re:

Seems not to worck for me, the only diference I am using Connect instead of Bind: Connect(ID_TEXTCTRL1,wxEVT_KILL_FOCUS,(wxObjectEventFunction)&MyFrame::OnKillFocus); Actually, it seems you made another important change, which broke the code. You now call Connect() on MyFrame, not on the wxText...
by gtafan
Mon Jan 07, 2019 11:17 am
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re: Re:

Is there no other way to get the event when textctrl looses focus? I really want to use wxTextCtrl and not some other custom class. I may be missing something but using wxEVT_KILL_FOCUS seems to work just fine? #include <wx/wx.h> class MyDialog : public wxDialog { public: MyDialog () : wxDialog(NUL...
by gtafan
Fri Jan 04, 2019 11:57 am
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 5851

Re:

What I would do is, subclass wxTextCtrl, then override wxWindow::SetFocus(). SetFocus is called when focus is set and "killed". It is virtual so it is "override-ready". http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowsetfocus Then use wxWindow::FindFocus() within the m...
by gtafan
Thu Dec 13, 2018 2:26 pm
Forum: C++ Development
Topic: Full Working Example of a wxGrid
Replies: 15
Views: 9889

Re: Full Working Example of a wxGrid

but something like sscanf is unfortunately mising, at least I have not found it. Well, I have never used but it there is (undocumented, used in wxWidgets codebase itself) wxSscanf(). However, I believe that using that family of C functions (wrapped by wxWidgets in those wxCRT_* functions) in C++ fe...
by gtafan
Wed Dec 12, 2018 2:46 pm
Forum: C++ Development
Topic: Full Working Example of a wxGrid
Replies: 15
Views: 9889

Re: Full Working Example of a wxGrid

That "3.1415" is just a string, so you have to convert it to float, which is really a big pain in the as in wxWidgets, since it has no simple convertion function. While you may be right about other things, I am not sure about lacking a simple conversion function. To convert a number to wx...
by gtafan
Wed Dec 12, 2018 12:26 pm
Forum: C++ Development
Topic: Full Working Example of a wxGrid
Replies: 15
Views: 9889

Re: Full Working Example of a wxGrid

I mean for example that SetColFormatFloat, it does nothing really usefull and since it is not posible to get and set float values to a cell of the grid it apears complete useless to me. Can somebody posibly explain why such functions exist at all? So to make clear what I would like wxGrid to use fo...
by gtafan
Tue Dec 11, 2018 4:09 pm
Forum: Announcements and Discoveries
Topic: wxWidgets v3.1.2 release is out ;)
Replies: 4
Views: 10156

Re: wxWidgets v3.1.2 release is out ;)

Technically only even minor version numbers indicate a "stable" version (2.6.x, 2.8.x, 3.0.x, 3.2.x etc) Therefore 3.1.2 is a "development" version. But "stable" only means that the API is stable, it doesn't mean that it crashes less. IMHO 3.1.2 is safe to use, even fo...
by gtafan
Tue Dec 11, 2018 1:59 pm
Forum: Announcements and Discoveries
Topic: wxWidgets v3.1.2 release is out ;)
Replies: 4
Views: 10156

Re: wxWidgets v3.1.2 release is out ;)

But is it a stable version?
by gtafan
Tue Dec 11, 2018 1:31 pm
Forum: C++ Development
Topic: Full Working Example of a wxGrid
Replies: 15
Views: 9889

Re: Full Working Example of a wxGrid

That wiki stuff seems to be really interesting, specialy since it shows how useles some wxGrid functions are. I mean for example that SetColFormatFloat, it does nothing really usefull and since it is not posible to get and set float values to a cell of the grid it apears complete useless to me. Can ...
by gtafan
Mon Dec 03, 2018 2:58 pm
Forum: C++ Development
Topic: wxThread and OpengL
Replies: 7
Views: 1352

Re: wxThread and OpengL

Hi, Accessing ANY GUI IN THE SECONDARY THREAD IS NOT SAFE AND WILL LEAD TO CRASJES!!!! It might work in one OS, or maybe 2 (if you are lucky), but generally in a cross-platform environment it is considered a VERY BAD PRACTICE!!! Thank you. What you mean by NOT SAFE? Not thread safe? Why should it b...