Search found 122 matches

by tomay3000
Thu May 30, 2019 4:08 am
Forum: C++ Development
Topic: How to add a wxCheckBox to a wxStaticBoxSizer?
Replies: 1
Views: 44

How to add a wxCheckBox to a wxStaticBoxSizer?

Hello,
I was wondering, how to add a wxCheckBox to a wxStaticBoxSizer, so I can disable the whole wxStaticBox.

TIA.
by tomay3000
Sat May 18, 2019 8:38 pm
Forum: C++ Development
Topic: What is the proper way to cast (void *) to (wxString *)?
Replies: 1
Views: 76

What is the proper way to cast (void *) to (wxString *)?

Hello, I was wondering what to use to cast (void *) to (wxString *)! Suppose I have the following function: namespace util { size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata) { reinterpret_cast<wxString *>(userdata)->Append(ptr, size * nmemb); // <--- Cast (1): Should I use...
by tomay3000
Fri May 10, 2019 11:51 pm
Forum: C++ Development
Topic: How to call a function in a new thread as std::thread does using wxWidgets?
Replies: 8
Views: 149

Re: How to call a function in a new thread as std::thread does using wxWidgets?

Interesting std::thread simulation.
I will give it a try.

Thank you.
by tomay3000
Fri May 10, 2019 9:03 pm
Forum: C++ Development
Topic: How to call a function in a new thread as std::thread does using wxWidgets?
Replies: 8
Views: 149

Re: How to call a function in a new thread as std::thread does using wxWidgets?

I just thought, it may exist in the toolkit and just not documented, and I am not seeing it.
Since I am using wxWidgets, why not using such a function (if it exists) as for example I am using wxString all the time instead of std::string.
by tomay3000
Fri May 10, 2019 8:07 pm
Forum: C++ Development
Topic: How to call a function in a new thread as std::thread does using wxWidgets?
Replies: 8
Views: 149

How to call a function in a new thread as std::thread does using wxWidgets?

Hello, I need to know if there is a way to call a function in a new thread as std::thread does using just wxWidgets as it does for wxEvtHandler::CallAfter (simple and easy and accepts lambda functions as well). I don't need to write the entire wxThread derived class declaration and implementation fr...
by tomay3000
Wed Apr 03, 2019 3:27 am
Forum: C++ Development
Topic: Inserting like over 1 million records in a wxDataViewListCtrl will make the GUI stuck forever!
Replies: 2
Views: 96

Inserting like over 1 million records in a wxDataViewListCtrl will make the GUI stuck forever!

Hello, I have a simple application that loads Firebird database records and inserts them in a wxDataViewListCtrl . I have made a simple test to check that my application works as expected by filling that database with over 1 million records and tried again, this time the application GUI is completel...
by tomay3000
Sat Mar 30, 2019 8:47 pm
Forum: C++ Development
Topic: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?
Replies: 6
Views: 164

Re: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?

Yes indeed I forgot to call Layout() after each AddOperateur(). #-o
And thank you for fixing the vertical scrollbar problem, "Chapeau expression".
it seems that I have to learn more about scrolled windows.
by tomay3000
Sat Mar 30, 2019 3:57 pm
Forum: C++ Development
Topic: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?
Replies: 6
Views: 164

Re: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?

You're adding 3 items and there is enough room, so why should there be a horizontal scrollbar? Actually I am adding more than 3 (12), that's why the horizontal scrollbar should appear. If you want me to try it out, make the code compilable. Yes sure, please, and sorry about the previous code. This ...
by tomay3000
Sat Mar 30, 2019 2:46 pm
Forum: C++ Development
Topic: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?
Replies: 6
Views: 164

Re: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?

ONEEYEMAN wrote:
Sat Mar 30, 2019 5:15 am
Hi,
What is your wxWidgets version?
Can you try to add one more panel the scrolled window?

Thank you.
wx Version 3.1.2
I already added at least four items. It is just the scrollbars are not showing.
by tomay3000
Sat Mar 30, 2019 3:26 am
Forum: C++ Development
Topic: How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?
Replies: 6
Views: 164

How to get a wxScrolledWindow inside a wxDiloag to show its scrollbars?

Hello, I have sub-classed wxGenericProgressDialog to add more widgets on it using a loop. When a new item is added the dialog expands, and I have controlled it to expand no more than 3 item horizontally. The main window that holds these controls is a wxScrolledWindow inside the main dialog of course...
by tomay3000
Mon Mar 25, 2019 8:16 am
Forum: C++ Development
Topic: How to intercept a clipboard paste event and pass it to the associated validator?
Replies: 3
Views: 102

How to intercept a clipboard paste event and pass it to the associated validator?

Hello, I have an associated wxTextValidator and wxFloatingPointValidator for some wxTextCtrl . As the validator is only invoked for keystrokes, I want to add extra control for clipboard paste events. Where to intercept the paste event and pass the validation to the associated validator for validatio...
by tomay3000
Sun Mar 24, 2019 11:35 am
Forum: C++ Development
Topic: How to change the locale in app run-time so that a wxDatePickerCtrl will show the date for that locale?
Replies: 9
Views: 170

Re: How to change the locale in app run-time so that a wxDatePickerCtrl will show the date for that locale?

It worked but I had to take note and store the previous settings in a member string variable on application initialization: bool MyApp::OnInit() { if (!wxApp::OnInit()) { return false; } #ifdef __WXMSW__ const int cnDataSize = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SSHORTDATE, NULL, 0); TCHAR szL...