Search found 47 matches

by denarced
Thu Jan 12, 2012 9:01 am
Forum: C++ Development
Topic: How to implement timeout behavior for wxTextCtrl
Replies: 2
Views: 1009

How to implement timeout behavior for wxTextCtrl

Hello, do you have any ideas on how to implement automatic database search when the user stops typing for, let's say, 500ms? I thought about it and all I could come up with was having a separate thread for the timer. If that's the best solution, is there some utilities in wxWidgets that'll make the ...
by denarced
Wed Jan 11, 2012 8:08 am
Forum: C++ Development
Topic: Adding widgets that fit result in horizontal scrollbar
Replies: 1
Views: 566

Re: Adding widgets that fit result in horizontal scrollbar

I never found a good solution to this problem, but I did find a couple of so-so solutions: Fix the widths of the widgets at compile time; leave room for the scrollbars. Make sure the scrollbars are always visible, necessary or not, and therefore the one designated widget will only expand as much as ...
by denarced
Tue Jan 10, 2012 11:53 am
Forum: C++ Development
Topic: Changing wxTextCtrl's value doesn't change its visible text
Replies: 3
Views: 772

Re: Changing wxTextCtrl's value doesn't change its visible t

Removing the used validator solved the problem.
Don't know why the validator also filtered the numerical data but it did.
Not when typing but when setting programmatically.
by denarced
Tue Jan 10, 2012 11:25 am
Forum: C++ Development
Topic: Changing wxTextCtrl's value doesn't change its visible text
Replies: 3
Views: 772

Re: Changing wxTextCtrl's value doesn't change its visible t

Executing the textCtrl's Clear method does not remove it's value.
Are the visible text and the control's value distinct entities ?
I can even use SetSelection() and Copy() to copy the value into the
Windows clipboard successfully.
This could have something to do with the wxTextValidator used.
by denarced
Tue Jan 10, 2012 11:05 am
Forum: C++ Development
Topic: Changing wxTextCtrl's value doesn't change its visible text
Replies: 3
Views: 772

Re: Changing wxTextCtrl's value doesn't change its visible t

To the extent its relevant, this value changing takes place in a wxDialog's constructor.
The wxTextCtrl in question is an attribute of the dialog.
by denarced
Tue Jan 10, 2012 10:57 am
Forum: C++ Development
Topic: Changing wxTextCtrl's value doesn't change its visible text
Replies: 3
Views: 772

Changing wxTextCtrl's value doesn't change its visible text

The title pretty much says it all.
I have tried using ChangeValue, SetValue, <<-operator. All of them change the value
for sure (another textCtrl reads it), but it doesn't become visible.
I have tried to apply Update and Refresh after changing the value but still no go.

Ideas ?
by denarced
Mon Jan 09, 2012 1:40 pm
Forum: C++ Development
Topic: Can't connect to wxDialog's close event
Replies: 4
Views: 2176

Re: Can't connect to wxDialog's close event

Hah! It's proven again: it's always worth the trouble to make sure you understood correctly because you usually didn't :D

Much thanks doublemax!
by denarced
Mon Jan 09, 2012 12:25 pm
Forum: C++ Development
Topic: Can't connect to wxDialog's close event
Replies: 4
Views: 2176

Re: Can't connect to wxDialog's close event

Only command events travel up in the window hierarchy, wxEVT_CLOSE_WINDOW does not. Let's see if I understood you correctly. The event is raised in the dialog itself. Trying to "register" the event to another object doesn't work because it doesn't travel up in the window hierarchy; in this case fro...
by denarced
Mon Jan 09, 2012 11:12 am
Forum: C++ Development
Topic: Can't connect to wxDialog's close event
Replies: 4
Views: 2176

Can't connect to wxDialog's close event

I'm running my code in a debugger and when the wxDialog in the following code is closed, the event handler function winClosing is never reached. Any ideas why? bool MyApp::OnInit() { wxFrame *frame = new wxFrame(NULL, wxID_ANY, "title", wxDefaultPosition, wxSize(250, 150)); wxDialog *dialog = new wx...
by denarced
Mon Jan 09, 2012 7:21 am
Forum: C++ Development
Topic: Adding widgets that fit result in horizontal scrollbar
Replies: 1
Views: 566

Adding widgets that fit result in horizontal scrollbar

Hello, Here's the basic steps I'm performing: Statically create productScroller(wxScrolledWindow) -> scrollSizer(wxBoxSizer) -> productRow(wxBoxSizer) and then dynamically: Create productRow, identical to the one created statically at compile-time. Add it to scrollSizer call productScroller.FitInsid...
by denarced
Sat Jan 07, 2012 9:15 am
Forum: C++ Development
Topic: How to change wxFilePickerCtrl's label ?
Replies: 4
Views: 1313

Re: How to change wxFilePickerCtrl's label ?

I guess the smart play is to just leave it be.
I'll have to try freshairfly's suggestion thou; could work.

Thank you freshairfly and doublemax.
by denarced
Sat Jan 07, 2012 9:13 am
Forum: C++ Development
Topic: App initialization and cleanup confusion
Replies: 2
Views: 698

Re: App initialization and cleanup confusion

Thank you doublemax.
I have now tried the IMPLEMENT_APP_NO_MAIN macro, things are working smoothly.
Thanks for the tip.
by denarced
Wed Jan 04, 2012 2:28 pm
Forum: C++ Development
Topic: How to change wxFilePickerCtrl's label ?
Replies: 4
Views: 1313

Re: How to change wxFilePickerCtrl's label ?

This post indicates that it's OS dependent but doesn't provide a way to override it.
by denarced
Wed Jan 04, 2012 2:19 pm
Forum: C++ Development
Topic: How to change wxFilePickerCtrl's label ?
Replies: 4
Views: 1313

How to change wxFilePickerCtrl's label ?

Hello,

I can't see a place where to change the 'Browse'-label inside wxFormBuilder.
I tried the methods SetLabelText and SetLabel, no go (I wonder what they change).

Thanks in advance (thou I'll probably provide some more after a solution magically appears :D) ..
by denarced
Wed Jan 04, 2012 6:40 am
Forum: C++ Development
Topic: App initialization and cleanup confusion
Replies: 2
Views: 698

App initialization and cleanup confusion

Hello, I've been trying to create a wxWidgets program which is easy to test; it has a separate main for unit tests and the GUI is dumb. Because of this I couldn't use the normal IMPLEMENT_APP. Visual Studio warns me about memory leaks and while I have been googling for an hour, I haven't found a cle...