Search found 53 matches

by Nick
Wed Mar 25, 2020 8:57 pm
Forum: C++ Development
Topic: Difficulty with BIND Part 2
Replies: 2
Views: 49

Re: Difficulty with BIND Part 2

Call "event.Skip()" in the OnSize handler, so that the default behavior is executed, too. It worked! I will study more about event.Skip (); Thank you! For others who will read this Post: When I created the example, I declared the wxFrame wrong. Blocking his resizing. The correct way is: FrmMain = n...
by Nick
Wed Mar 25, 2020 6:33 pm
Forum: C++ Development
Topic: Difficulty with BIND Part 2
Replies: 2
Views: 49

Difficulty with BIND Part 2

I learned in the topic: forums.wxwidgets.org/viewtopic.php?f=1&t=46953 The command: FrmMain->Bind(wxEVT_SIZE, &MyProgram::OnSize, this); And with it I set up the program below that works! #include <wx/app.h> #include <wx/frame.h> #include <wx/panel.h> class MyProgram: public wxApp { public: wxFrame ...
by Nick
Tue Mar 24, 2020 8:19 pm
Forum: General Development
Topic: Why does wxWidgets Documentation need to be so confusing?
Replies: 4
Views: 133

Re: Why does wxWidgets Documentation need to be so confusing?

I understand everything you two said above. Yes, there are many tutorials scattered on the Internet, and most are obsolete. Even on the wxWidgets Wiki. And it confuses! But I'm talking about making it easier! And if it is possible to do that, why not? Look at this example: wiki.wxwidgets.org/The_Ful...
by Nick
Tue Mar 24, 2020 2:26 pm
Forum: General Development
Topic: Why does wxWidgets Documentation need to be so confusing?
Replies: 4
Views: 133

Why does wxWidgets Documentation need to be so confusing?

An example, starting with wxFrames, Default Constructor: docs.wxwidgets.org/trunk/classwx_frame.html#af80368ba23c71c5d947c3178b8fe10fc It is not exactly a Default because if I declare it does not work. Why don't you have an example right after the explanation? Wouldn't it be easier for those who ar...
by Nick
Tue Mar 24, 2020 1:52 pm
Forum: C++ Development
Topic: Difficulty with Bind and Events
Replies: 2
Views: 64

Re: Difficulty with Bind and Events

New Pagodi wrote:
Tue Mar 24, 2020 3:17 am
You usually call Bind on the object generating the event you want to handle. Since the frame is the object generating the size event, you should call

Code: Select all

FrmMain->Bind(wxEVT_SIZE, &MyProgram::OnSize, this);
Worked perfectly
Thank you very much!
by Nick
Tue Mar 24, 2020 2:25 am
Forum: C++ Development
Topic: Difficulty with Bind and Events
Replies: 2
Views: 64

Difficulty with Bind and Events

Example program: When resizing the window it changes the title The problem is that it is not capturing the FrmMain event. It captures the Application event, which forced me to place a wxPanel But I don't know how to put FrmMain here! &MyProgram::OnSize Because FrmMain is not a Class! And in this cas...
by Nick
Mon Mar 23, 2020 7:00 pm
Forum: C++ Development
Topic: Strings how to use correctly?
Replies: 3
Views: 102

Re: Strings how to use correctly?

As for me the documentation is quite clear, and Functions and Macros by Category section and Unicode Support in wxWidgets . Did you read exactly this pages? In short - or use wide strings (L prefix) or use wxString::FromUTF8. The question arose just when I read these links!!! So I thought the corre...
by Nick
Mon Mar 23, 2020 2:24 pm
Forum: C++ Development
Topic: Strings how to use correctly?
Replies: 3
Views: 102

Strings how to use correctly?

I do not speak English, which makes it very difficult for me to understand wxWidgets documentation that does not have examples in its informative content. But reading in the wxwidegts documentation on obsolete commands I was confused. -----------------------------------------------------------------...
by Nick
Mon Mar 16, 2020 11:17 pm
Forum: C++ Development
Topic: wxTextCtrl for C char variable
Replies: 3
Views: 112

Re: wxTextCtrl for C char variable

You just shouldn't use char when dealing with Unicode strings. Depending on what you need to do with the data, use either wxString for the whole content or wxUniChar for individual characters. Thanks for the information. =D> I am using char because I am keeping the sources in C Pure. I'm using WxWi...
by Nick
Mon Mar 16, 2020 9:50 pm
Forum: C++ Development
Topic: wxTextCtrl for C char variable
Replies: 3
Views: 112

wxTextCtrl for C char variable

I have already tried countless different options and I am having trouble bringing a text with accents from wxTextCtrl to a variable in C, as I will work with that variable, and then send its value back to wxTextCtrl GOAL accented word Lálálá in EdText1->GetValue() FOR char Text[101]; Then send from ...
by Nick
Fri Nov 29, 2019 11:40 am
Forum: C++ Development
Topic: Statusbar Beginner
Replies: 3
Views: 133

Re: Statusbar Beginner

The style flag is a bit mask. Try this: CreateStatusBar(3, wxSTB_DEFAULT_STYLE | wxSB_SUNKEN); But depending on the OS/theme it's also possible that the visual style is ignored and the status bar always looks the same. And both the way you presented above and the way I posted the question, Style's ...
by Nick
Fri Nov 29, 2019 11:16 am
Forum: C++ Development
Topic: GetSize or GetClientSize Beginner wxWidgets 3.1.3
Replies: 7
Views: 190

Re: GetSize or GetClientSize Beginner wxWidgets 3.1.3

wxMessageBox( wxString::Format("client size: %d %d", EdNote->GetClientSize().x, EdNote->GetClientSize().y) ); Alternative: wxLogMessage( "client size: %d %d", EdNote->GetClientSize().x, EdNote->GetClientSize().y ); Wow, it worked! Now I can play with this command! But I also enjoyed learning about ...
by Nick
Fri Nov 29, 2019 10:50 am
Forum: C++ Development
Topic: Statusbar Beginner
Replies: 3
Views: 133

Statusbar Beginner

I tried 2 ways to change the style of the Statusbar but none of them work! I'm trying to follow what I read in the wxFrame and wxStatusbar Class but something is missing I wish the first form works because it has less code written Attempt 1 CreateStatusBar(3, wxSB_SUNKEN); // Does not display correc...
by Nick
Fri Nov 29, 2019 10:28 am
Forum: C++ Development
Topic: GetSize or GetClientSize Beginner wxWidgets 3.1.3
Replies: 7
Views: 190

Re: GetSize or GetClientSize Beginner wxWidgets 3.1.3

In most cases use GetSize(). If you call GetSize() of a wxFrame, it will return the complete outer size including border, caption bar, menu bar etc. If you call GetClientSize(), it will return only the inner part where you can put your own content. Yes, I understood the difference between the 2 com...
by Nick
Fri Nov 29, 2019 9:06 am
Forum: C++ Development
Topic: GetSize or GetClientSize Beginner wxWidgets 3.1.3
Replies: 7
Views: 190

Re: GetSize or GetClientSize Beginner wxWidgets 3.1.3

Hi, Why do you want to set the size of the frame? Also, getting the sizes of the controls inside frame won't help. You should use sizers to calculate the sizes and position controls. Thank you. Trying to explain even more detailed Problem 1 I have a window that I don't know the size! So I needed to...