Search found 118 matches

by JohnD
Mon Jan 19, 2009 1:21 pm
Forum: C++ Development
Topic: Replacing an auto-placed control
Replies: 10
Views: 1300

I have it working now, using Sizer::Show, Sizer::Layout. I did also slightly change my slider setup so it's possible something else was a factor previously, but the method you suggest now works great... thanks for your help everybody.
by JohnD
Fri Jan 16, 2009 3:42 pm
Forum: C++ Development
Topic: Replacing an auto-placed control
Replies: 10
Views: 1300

No change. Is it ok to show/hide the control or do I have to call Sizer::Show?
by JohnD
Fri Jan 16, 2009 2:47 pm
Forum: C++ Development
Topic: Replacing an auto-placed control
Replies: 10
Views: 1300

I tried this and it doesn't work quite as expected. I do the following: wxWindow *p = new wxPanel(this); wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL); ctrl1 = new View(p,wxDefaultPosition.x,wxDefaultPosition.y,width/2,height/2); ctrl2 = new View(p,wxDefaultPosition.x,wxDefaultPosition.y,width/2,h...
by JohnD
Tue Jan 06, 2009 3:53 pm
Forum: C++ Development
Topic: Replacing an auto-placed control
Replies: 10
Views: 1300

Thanks, will give it a go. Am I right to think a hidden control will receive no render/resize events? These controls are used to house 3D rendering windows and having multiple such windows running will be a BAD thing :)
by JohnD
Tue Jan 06, 2009 3:33 pm
Forum: C++ Development
Topic: Replacing an auto-placed control
Replies: 10
Views: 1300

Replacing an auto-placed control

In my application I use sizers to automatically place controls and allow the window to resize. I need to be able to switch between two different controls which will have same size and position... ideally I would create a new control and replace the existing one, does wx allow me to do this?
by JohnD
Sat Jan 03, 2009 12:40 pm
Forum: C++ Development
Topic: Extending wxSlider
Replies: 2
Views: 650

Thanks for that, it makes sense apart from that the existing slider-based events let me access the slider value without having to grab hold of the slider object itself. Is it relatively simple to create my own event, or too much trouble?
by JohnD
Fri Jan 02, 2009 6:55 pm
Forum: C++ Development
Topic: Extending wxSlider
Replies: 2
Views: 650

Extending wxSlider

In my app I want to use a slider, but each time it changes I want to know how much it's moved, not just the current value. For just one slider I could store the old value in my app but I think I want to write a custom control. What is the general way I could approach this, bearing in mind that the e...
by JohnD
Mon Dec 29, 2008 1:17 pm
Forum: C++ Development
Topic: Do windows/components know the app manging them?
Replies: 1
Views: 459

Do windows/components know the app manging them?

In my wx application, it seems to make sense for my Application class to manage certain objects which are created once and provide access to data etc. These objects are needed by several parts of the application - different windows and controls use them. My question is if each window/control has a b...
by JohnD
Fri Nov 28, 2008 4:52 pm
Forum: C++ Development
Topic: Horizontal sizers within another horizontal sizer
Replies: 2
Views: 594

Works great, many thanks.
by JohnD
Fri Nov 28, 2008 4:24 pm
Forum: C++ Development
Topic: Horizontal sizers within another horizontal sizer
Replies: 2
Views: 594

Horizontal sizers within another horizontal sizer

I want to have 3 sets of 2 buttons, aligned to left, middle and right of their parent. e.g. --------------------------------------------------------------------- | ------ ------ ------ ------ ------ ------ | ||Btn 1| |Btn 2 | |Btn 3 | |Btn 4 | |Btn 5 | |Btn 6 | | | ------ ------ ------ ------ ------...
by JohnD
Fri Nov 28, 2008 3:05 pm
Forum: C++ Development
Topic: wxBitmapButton & image scaling
Replies: 1
Views: 1125

wxBitmapButton & image scaling

I can't find from the documentation if the wxBitmapButton class supports scaling the image to fit the button. I just tried to set the size of a button smaller than the default and it didn't seem to change anything much at all. Is it supported using some combination of styles/settings I haven't thoug...
by JohnD
Thu Nov 27, 2008 4:36 pm
Forum: C++ Development
Topic: Why oh why does wxString exist...
Replies: 5
Views: 1240

Why oh why does wxString exist...

... and is there an efficient, neat way to convert to std::string?

I've been coding in Java for quite a while until recently, had forgotten how virtually every C++ library has its own string class :)
by JohnD
Fri Nov 21, 2008 2:24 pm
Forum: C++ Development
Topic: Newbie Problem with Sizers
Replies: 2
Views: 572

Newbie Problem with Sizers

Hi, first post, please be kind :) I've been reading the tutorials about sizers but can't get them to work as I expect. I basically have a vertical boxsizer with 3 elements, each one a horizontal box sizer with a few things inside. Some I specify a minimum size for, others I leave as the default. I u...