Search found 122 matches
- Sun Aug 25, 2019 3:41 am
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling wxWidgets on Win32: DLLs Installed to ${PREFIX}/lib
- Replies: 2
- Views: 1074
Compiling wxWidgets on Win32: DLLs Installed to ${PREFIX}/lib
I apologize for this question because I am sure it has been answered more than once, but I haven't been able to find an answer myself. I am compiling wxWidgets 3.1.2 on Windows under MSYS2/MinGW-w64 . I have no problems compiling. The only issue is that in the make install command, the .dll files ar...
- Sun Jul 14, 2019 9:32 am
- Forum: C++ Development
- Topic: wxRichTextCtrl Text Not Centering
- Replies: 6
- Views: 1950
Re: wxRichTextCtrl Text Not Centering
You need a matching EndAlignment() call. It didn't work with this changes either. But if called Newline/0 style works as expected. Adding a new line after the text worked for me. Thank you Kvaz1r. te->WriteText("Hello rich text!\n"); or te->WriteText("Hello rich text!"); te->New...
- Sun Jul 14, 2019 1:15 am
- Forum: C++ Development
- Topic: wxRichTextCtrl Text Not Centering
- Replies: 6
- Views: 1950
wxRichTextCtrl Text Not Centering
I'm trying to center justify the text of a wxRichTextCtrl. The docs say to use wxRichTextCtrl::StartAlignment(wxTEXT_ALIGNMENT_CENTER) , but it's not working: #include <wx/wx.h> #include <wx/richtext/richtextctrl.h> class Window : public wxFrame { public: Window(); private: wxRichTextCtrl* te; }; Wi...
- Mon Jul 08, 2019 8:39 am
- Forum: C++ Development
- Topic: Parsing and Displaying Markdown File
- Replies: 4
- Views: 1718
Re: Parsing and Displaying Markdown File
Thank you doublemax, that is what I will do.
- Mon Jul 08, 2019 3:05 am
- Forum: C++ Development
- Topic: Parsing and Displaying Markdown File
- Replies: 4
- Views: 1718
Parsing and Displaying Markdown File
Does wxWidgets have an implementation or method for displaying Markdown text? I see in STC library there are some defines that mention Markdown. Is there a flag that can be set for wxStyledTextCtrl that makes it parse Markdown? I haven't found anything yet in the documentation for that. Edit: Oh, I ...
- Wed Jul 03, 2019 8:39 pm
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
Can you make simple compilable app which demonstrates your problem. That way one can easily test and see the issue. Linking old code does not help and is waste of time for people who try to help! Only the first link was to my old code. I'm using Git version control hosting on GitHub. So to see the ...
- Wed Jul 03, 2019 11:18 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
Thank you, but that is old code, & none of that helps me with the question of this topic.
--- Edit ---
I only linked to my old code to show the examples of how posting custom events was working.
--- Edit ---
I only linked to my old code to show the examples of how posting custom events was working.
- Wed Jul 03, 2019 9:35 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
... If you still support <wx3 ... Nope, I don't support wx 2.x anymore. Changed my code to use Bind instead of Connect :). Unfortunately, still doesn't solve my problem. :( --- Edit --- There are wxWiki pages for custom events that you might find helpful. Assuming that you don't need to stay compat...
- Wed Jul 03, 2019 8:54 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
Thank you for that information. If that is the case, why haven't they deprecated Connect yet?
- Wed Jul 03, 2019 8:37 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
Not answering the question, but was wondering why don't you use Bind! I haven't studied the difference between Bind & Connect . Is one preferred for certain situations over the other? All I know is that "Bind" has something to do with "dynamically" connecting the event. --- ...
- Wed Jul 03, 2019 8:24 am
- Forum: C++ Development
- Topic: wxEVT_LEFT_DOWN on menuBar
- Replies: 8
- Views: 1632
Re: wxEVT_LEFT_DOWN on menuBar
I think this is because of wxMenuBar 's implicit handling of mouse events. I'm not sure how you would override it. Tested it out with this code: #include <iostream> #include <wx/wx.h> using namespace std; class MyFrame : public wxFrame { public: MyFrame(); private: void OnLeftDown(wxMouseEvent& ...
- Wed Jul 03, 2019 7:05 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Re: Custom Event Isn't Being Caught
wxCommandEvent SoundFinishEvent(wxEVT_NULL, ID_SOUNDEND); ID and event type are in the wrong order here. Switching them doesn't fix it: wxCommandEvent SoundFinishEvent(ID_SOUNDEND, wxEVT_NULL); According to the docs , wxEventType is the first argument, & id is the second. Here is some test code...
- Wed Jul 03, 2019 6:38 am
- Forum: C++ Development
- Topic: Custom Event Isn't Being Caught
- Replies: 19
- Views: 3347
Custom Event Isn't Being Caught
I'm reworking an old project & have moved some code around. My MainWindow class used to post a custom event, when a secondary thread finished, to the main thread. Example: abc.cpp (catching event) ( source ): Connect(wxID_ANY, ID_KEY, wxCommandEventHandler(MainWindow::ChangeLetter), 0, this); ab...
- Mon Jul 01, 2019 10:18 pm
- Forum: C++ Development
- Topic: Check if wxString Contains Alphabetic Characters Only
- Replies: 6
- Views: 1570
Re: Check if wxString Contains Alphabetic Characters Only
bool isAlphaChar(char fch){ return (fch >='a' && fch <='z') || (fch>='A' && fch<='Z'); } bool isAlphaString(const wxString &fs){ for(int i=0; i<fs.Length(); ++i){ if(!isAlphaChar(fs[i])) return false; } return true; } Interesting solution. Thank you. Beware that all solutions in...
- Mon Jul 01, 2019 9:54 pm
- Forum: C++ Development
- Topic: How to embed fonts into your Windows programs.
- Replies: 16
- Views: 5066
Re: How to embed fonts into your Windows programs.
Thank you Dark Alchemist. This worked for me. I had also tried using AddFontResource , but couldn't get that one to work. I like this better anyway because the font is actually embedded into the executable. For anyone using wxWidgets 3.1.1, the static method wxFont::AddPrivateFont has been added. Un...