Search found 17 matches

by sw
Thu May 28, 2020 9:35 pm
Forum: C++ Development
Topic: wxComboBox with AutoComplete get selection returns -1
Replies: 7
Views: 83

Re: wxComboBox with AutoComplete get selection returns -1

Indexing the list of strings returns the correct index. Thank you doublemax. Yes, selecting from the whole dropdown "manually" returns the correct index via GetSelection(). Well, the autocomplete is there for a usability perspective since the wxComboBox contains 100+ entries and typing in to narrow ...
by sw
Thu May 28, 2020 8:00 pm
Forum: C++ Development
Topic: wxComboBox with AutoComplete get selection returns -1
Replies: 7
Views: 83

Re: wxComboBox with AutoComplete get selection returns -1

So is there a way I can get the index of the value selected via the autocomplete? Out of curiosity, why is this normal behavior? Just to clarify on the latter case I did there. What I meant is that I was browsing the full list, I meant browsing the full list. Not the autocomplete list, i.e. I didn't...
by sw
Thu May 28, 2020 5:48 pm
Forum: C++ Development
Topic: wxComboBox with AutoComplete get selection returns -1
Replies: 7
Views: 83

Re: wxComboBox with AutoComplete get selection

The list of string choices are being populated from a database so I'm not seeing any of the "stock" choices in the control. Even in the autocomplete. It's just returning matches based on the wxArrayString choices I passed into the method originally. If I type into the control and press enter on the ...
by sw
Thu May 28, 2020 3:34 pm
Forum: C++ Development
Topic: wxComboBox with AutoComplete get selection returns -1
Replies: 7
Views: 83

wxComboBox with AutoComplete get selection returns -1

I have a wxComboxBox created with the wxCB_DROPDOWN style flag. I have enabled auto complete via bool wxTextEntry::AutoComplete(const wxArrayString& choices); and it works as expected. So when a user types the dropdown appears with suggestions and that is fine. But when selecting a option either by ...
by sw
Tue Feb 18, 2020 6:11 pm
Forum: Platform Related Issues
Topic: Understanding wxNotificationMessage::MSWUseToasts
Replies: 2
Views: 217

Re: Understanding wxNotificationMessage::MSWUseToasts

I think I know what I was doing wrong. Previously, I was calling the method like so: wxNotificationMessage::MSWUseToasts(wxGetEmptyString(), wxGetEmptyString()); Now, calling it like so works: wxNotificationMessage::MSWUseToasts(); So I assume that now wxWidgets is filling in the two parameters? But...
by sw
Tue Feb 18, 2020 3:18 pm
Forum: Platform Related Issues
Topic: Understanding wxNotificationMessage::MSWUseToasts
Replies: 2
Views: 217

Understanding wxNotificationMessage::MSWUseToasts

I'm trying to understand wxNotificationMessage::MSWUseToasts(const wxString& shortcutPath = wxString(), const wxString& appId = wxString()) Specifically understanding it's parameters as defined in the docs https://docs.wxwidgets.org/trunk/classwx_notification_message.html#a52c56483b083d771de4d0819f4...
by sw
Tue Feb 11, 2020 11:16 am
Forum: C++ Development
Topic: wxTimePickerCtrl Format
Replies: 6
Views: 322

Re: wxTimePickerCtrl Format

Another potential idea is that you could hook into the kill focus event of a control and always set the seconds component to '00'. I had a similar scenario to yours wherein I did not want to allow a user to enter seconds. I eventually just opted to set the seconds to whenever a user clicks out of th...
by sw
Thu Jan 09, 2020 2:04 pm
Forum: Platform Related Issues
Topic: Handle Windows lock/unlock events in wxWidgets
Replies: 1
Views: 243

Handle Windows lock/unlock events in wxWidgets

Hi all :D I have been unable to find any information about handling Windows lock and unlock events (i.e. pressing 'Win' + 'L') As far as I can tell, it seems wxWidgets only has a event for a session ending (wxEVT_END_SESSION) which to my understanding is closing the app or logging off. Windows does ...
by sw
Mon Nov 04, 2019 6:42 pm
Forum: C++ Development
Topic: Button panel persistently sticking to left instead of middle
Replies: 2
Views: 264

Re: Button panel persistently sticking to left instead of middle

Thank you, doublemax! Worked perfectly :)
by sw
Mon Nov 04, 2019 7:03 am
Forum: C++ Development
Topic: Button panel persistently sticking to left instead of middle
Replies: 2
Views: 264

Button panel persistently sticking to left instead of middle

Hi all, I am battling to get a button panel with two buttons to be centered in the middle of my dialog. I have looked at how my sizers are laid out and it makes sense to me logically, but yet the button panel persists on being on the left. I have also looked at the 'layout' sample and tried to incor...
by sw
Sat Aug 24, 2019 9:35 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 275

Re: Thread completion event not being picked up in handler

Oh cool, that worked! Thank you!

Do you perhaps know why it works with Bind and not with the macro (EVT_THREAD)?
by sw
Sat Aug 24, 2019 8:13 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 275

Re: Thread completion event not being picked up in handler

That unfortunately had no effect... The thread completion is still not being invoked. Just as an update, I did modify the Entry function to be like so: wxThread::ExitCode CheckForUpdateThread::Entry() { std::string eventString = ""; wxLogDebug("Entered thread"); if (TestDestroy()) { return nullptr; ...
by sw
Sat Aug 24, 2019 7:13 am
Forum: C++ Development
Topic: Thread completion event not being picked up in handler
Replies: 5
Views: 275

Thread completion event not being picked up in handler

Hi all, I am running a thread from a dialog which is making a GET request to check for updates. So I followed the guide here https://docs.wxwidgets.org/trunk/classwx_thread.html . The only difference from there is that the handler had to be changed from EVT_COMMAND to EVT_THREAD. I get a compilation...
by sw
Wed Jul 31, 2019 1:17 pm
Forum: C++ Development
Topic: Unresolved external symbol with wxDECLARE_EVENT
Replies: 5
Views: 305

Re: Unresolved external symbol with wxDECLARE_EVENT

I'm so embarrassed, but I figured it out. I'm using namespaces in my application and I put the wxDEFINE_EVENT inside the namespace of the dialog source file. The frame is also in a namespace, but in a different one hence why the linker was struggling to find the event. Moving it out of the namespace...
by sw
Wed Jul 31, 2019 11:53 am
Forum: C++ Development
Topic: Unresolved external symbol with wxDECLARE_EVENT
Replies: 5
Views: 305

Re: Unresolved external symbol with wxDECLARE_EVENT

In the dialog: wxCommandEvent taskInsertedEvent(TASK_INSERTED); wxPostEvent(pParent, taskInsertedEvent); where pParent is a pointer to the frame class. In the frame: wxBEGIN_EVENT_TABLE(MainFrame, wxFrame) ... EVT_COMMAND(wxID_ANY, TASK_INSERTED, MainFrame::OnTaskInserted) ... wxEND_EVENT_TABLE() vo...