Search found 1925 matches

by PB
Thu Mar 21, 2019 4:33 pm
Forum: C++ Development
Topic: wxEVT_BUTTON is not fired
Replies: 21
Views: 205

Re: wxEVT_BUTTON is not fired

The wxWidgets trac ticket guidelines says: But this is not a bug tracker: this a user forum, which has a different purpose, audience, and workflow. Anyway, I am sorry if I came out even grumpier than usual (can I blame it on suffering from a severe cold ATM? :P ) but TBH, people not observing the S...
by PB
Thu Mar 21, 2019 3:08 pm
Forum: C++ Development
Topic: wxEVT_BUTTON is not fired
Replies: 21
Views: 205

Re: wxEVT_BUTTON is not fired

oneeyeman, I believe one is supposed to make the code as easy as possible to test for people trying to help. The code you posted has about 3,000 lines. How many of them are relevant to your issue? At least when one posts a .diff to a well-known working code, it is obvious what has changed. Still, th...
by PB
Thu Mar 21, 2019 1:07 pm
Forum: Compiler / Linking / IDE Related
Topic: adding release build to project
Replies: 10
Views: 152

Re: adding release build to project

I am sorry I do not have anything new to add to what I already said.
by PB
Thu Mar 21, 2019 12:25 pm
Forum: Compiler / Linking / IDE Related
Topic: adding release build to project
Replies: 10
Views: 152

Re: adding release build to project

Yes, having multiple build targets in a single project is the standard way.

TBH, I do not understand how you want to do it, as one does:
1. need both debug and release targets
2. not want to maintain two projects for one application..
by PB
Thu Mar 21, 2019 10:41 am
Forum: Compiler / Linking / IDE Related
Topic: adding release build to project
Replies: 10
Views: 152

Re: adding release build to project

Sorry, I forgot to mention that you also need to change the paths for the Release target. Mixing builds in the same folder can lead to bad things happening. In "Build targets" tab of "Project/targets options" dialog select the "Release" build target and replace "Debug" with "Release" in "Output file...
by PB
Wed Mar 20, 2019 7:31 pm
Forum: Compiler / Linking / IDE Related
Topic: How to compile wxWidgets samples under windows?
Replies: 15
Views: 237

Re: How to compile wxWidgets samples under windows?

wxWidgets by default build the libraries as static and those reside (for GCC) in "WXWIN/lib/gcc_lib". If your folder with libraries is named "gcc_dll", it means you also used "SHARED=1" when building wxWidgets building them as .DLLs and you need to use the same command line switch for the samples. A...
by PB
Wed Mar 20, 2019 7:27 pm
Forum: Compiler / Linking / IDE Related
Topic: adding release build to project
Replies: 10
Views: 152

Re: adding release build to project

Firstly, you need to have wxWidgets built in the release mode too, which I assume you have. If not, build them (adding "BUILD=release" to the command line). I also assume your Debug build target is fully functional and you can build and run the application as expected. I am not really using Code::Bl...
by PB
Wed Mar 20, 2019 5:59 pm
Forum: Compiler / Linking / IDE Related
Topic: How to compile wxWidgets samples under windows?
Replies: 15
Views: 237

Re: How to compile wxWidgets samples under windows?

Additionally, your folder structure looks unexpected (to the makefile): do you have the whole library (include, src, lib, build etc. folders there)? I.e., is wxWwidgets root dir really c:\0 instead of more common one like c:\wxWidgets?
by PB
Tue Mar 19, 2019 6:56 pm
Forum: C++ Development
Topic: reading very old binary file
Replies: 3
Views: 90

Re: reading very old binary file

And I suppose, generally you could read fixed-width strings with wxDataInputStream like this (untested) #include <wx/strconv.h> #include <wx/buffer.h> wxString ReadFixedWidthAnsiStringFromDataInputStream(wxDataInputStream& input, size_t width, const wxMBConv& conv = wxConvLocal) { wxCHECK(width > 0,...
by PB
Tue Mar 19, 2019 5:12 pm
Forum: C++ Development
Topic: Writing to binary file crashes application
Replies: 6
Views: 105

Re: Writing to binary file crashes application

In addition to what doublemax said. You can avoid the conversion to std::string when checking for the extension, using wxString's methods. Additionally, your check may be unintentionally case-sensitive, which is usually not desirable in such scenarios. C++ streams may not be the best suited for such...
by PB
Tue Mar 19, 2019 12:48 pm
Forum: C++ Development
Topic: How to manually validate wxTextCtrl value
Replies: 15
Views: 268

Re: How to manually validate wxTextCtrl value

BTW, numeric validators with their on-the-fly validation can be annoying enough in general (IMO), but on top of it, wxNumValidator has an annoying bug that can manifest if its allowed range does not include 0.
https://trac.wxwidgets.org/ticket/12968
by PB
Tue Mar 19, 2019 10:29 am
Forum: C++ Development
Topic: How to manually validate wxTextCtrl value
Replies: 15
Views: 268

Re: How to manually validate wxTextCtrl value

I may be missing something but this seems to work on MSW with GIT master wxValidator* validator = m_textCtrl->GetValidator(); if ( validator ) validator->Validate(m_textCtrl); } SSCCE #include <wx/wx.h> class MyDialog : public wxDialog { public: MyDialog() : wxDialog(NULL, wxID_ANY, "Test") { m_text...
by PB
Mon Mar 18, 2019 9:17 pm
Forum: C++ Development
Topic: How to create such a layout?
Replies: 23
Views: 417

Re: How to create such a layout?

I only looked at the UI in Access (current Office 365 on monthly channel) now and noticed that the grid there also has frozen rows and only the rows starting with Criteria scroll. So I guess you are out of luck with current wxGrid implementation.... Otherwise, basically the code I posted in my previ...
by PB
Mon Mar 18, 2019 8:01 pm
Forum: C++ Development
Topic: How to create such a layout?
Replies: 23
Views: 417

Re: How to create such a layout?

Yes - the grid is vertically scrollable. And thats the other reason I want to skip label renderer override - I don't want to keep re-assigning those labels on every single vertical scroll. Is that necessary, I thought if you use actual row headers they will always match the rows regardless of scrol...
by PB
Mon Mar 18, 2019 6:39 pm
Forum: C++ Development
Topic: How to create such a layout?
Replies: 23
Views: 417

Re: How to create such a layout?

I will try to play with just labels and spacers in a vertical sizer. This may not be easy, assuming the grid is vertically scrollable and one has to deal with it. Sizers and absolute positioning are not a good match.... FWIW, here is what I briefly played with (the labels align with rows only once ...