Search found 115 matches

by Victory
Thu Dec 29, 2011 3:02 pm
Forum: C++ Development
Topic: Buttons changing position
Replies: 3
Views: 1284

Buttons changing position

I am facing a weird problem. When I change the bitmap for a wxBitmapButton, that button and some other button(s) in the same panel suddenly change their position -- moving slightly to the left or down. I am not explicitly calling Layout etc. after changing the bitmap for the button. But, it seems li...
by Victory
Sun Dec 18, 2011 1:38 pm
Forum: C++ Development
Topic: Scrollbar color
Replies: 1
Views: 747

Scrollbar color

Is there a way to set the color of the scrollbar in wxScrolledWindow?

Thanks.
by Victory
Mon Dec 05, 2011 2:19 pm
Forum: C++ Development
Topic: Panels and Layout
Replies: 3
Views: 1844

Re: Panels and Layout

Hi, .... If the Layout() causes a child panel to be resized, that will trigger Layout() of its sizer. Otherwise it won't happen; and usually it won't be needed (after all, if the layout was correct and the size doesn't change, why should anything be altered. David Thanks for the reply. In my case, ...
by Victory
Mon Dec 05, 2011 1:03 pm
Forum: C++ Development
Topic: Panels and Layout
Replies: 3
Views: 1844

Panels and Layout

Suppose a window has a wxPanel inside, which in turn contains some other wxPanels, and so on. It seems like calling Layout() for the outermost window does not call the Layout method for the panels embedded inside. So, are we responsible for explicitly calling the Layout() method for each of the pane...
by Victory
Tue Nov 29, 2011 5:19 am
Forum: C++ Development
Topic: Centering a button inside panel
Replies: 6
Views: 1729

Re: Centering a button inside panel

Thanks "catalin" and "doublemax" for the work-around with the current implementation. It would be nice if the modified sizer behavior gets implemented. But, as "doublemax" hinted, there might be fear to touch that code.
by Victory
Mon Nov 28, 2011 5:45 am
Forum: C++ Development
Topic: Centering a button inside panel
Replies: 6
Views: 1729

Centering a button inside panel

I have a very simple use case where I just have a wxBitmapButton inside a panel. There are no other controls in the panel. I am finding that I can get the button to center horizontally or vertically, but not both. Any ideas about the best way to get the button centered both horizontally and vertical...
by Victory
Sun Nov 27, 2011 10:01 am
Forum: C++ Development
Topic: Wrapped Text, Scrolled Window
Replies: 0
Views: 1067

Wrapped Text, Scrolled Window

It seems like the increased height due to wrapping is not being considered while computing the size for wxStaticText (in some cases?) and as a result, the scrollbar ends up covering the wxStaticText control. In my case, I have a wxScrolledWindow with a wxFlexGridSizer. This sizer has two rows : The ...
by Victory
Sun Nov 06, 2011 12:48 pm
Forum: C++ Development
Topic: FindWindow/XRCCTRL fails sometimes
Replies: 6
Views: 1755

Re: FindWindow/XRCCTRL fails sometimes

Strange. Is this a debug wx build (though it's supposed not to make much difference in wx2.9)? And a debug build of your app? Yes - for both questions (Some other wxWidgets asserts have shown up at other times in the same build). It is also possible that there is some kind of error in the xrc expor...
by Victory
Sun Nov 06, 2011 10:35 am
Forum: C++ Development
Topic: FindWindow/XRCCTRL fails sometimes
Replies: 6
Views: 1755

Re: FindWindow/XRCCTRL fails sometimes

DavidHart wrote:
I've no idea how that managed to break FindWindow(), but gridsizer errors will soon die out anyway: wx2.9 asserts if there are too many items.
I am using wxWidgets 2.9.2 and did not get any assert.
by Victory
Sun Nov 06, 2011 6:36 am
Forum: C++ Development
Topic: Inheriting background color from parent window
Replies: 1
Views: 1059

Inheriting background color from parent window

wxFrame has a background color attribute ("bg"). When I create a layout in wxFormBuilder and set the "bg" attribute for the frame, all the panels within the frame inherit that background color. But, in the application, when I create the frame by loading the XRC file corresponding...
by Victory
Sun Nov 06, 2011 4:29 am
Forum: C++ Development
Topic: FindWindow/XRCCTRL fails sometimes
Replies: 6
Views: 1755

Re: FindWindow/XRCCTRL fails sometimes

Hi, What is 'this' in that line? Is it the parent of the button, or a grandparent, or...? What happens if you try FindWindowByName() instead, without specifying a parent? Regards, David "this" is an ancestor. Specifically, it is the pointer to the whole frame. Actually, I noticed that the...
by Victory
Sat Nov 05, 2011 2:59 pm
Forum: C++ Development
Topic: FindWindow/XRCCTRL fails sometimes
Replies: 6
Views: 1755

FindWindow/XRCCTRL fails sometimes

I am noticing that XRCCTRL is sometimes returning NULL even when the control with that name is really there in the layout. Any idea why it could be? It is not a casting issue; FindWindow itself is failing. The layout of my window is quite complex and this particular control (which is a wxButton) is ...
by Victory
Mon Oct 17, 2011 2:14 pm
Forum: C++ Development
Topic: wxrc, zip question
Replies: 1
Views: 939

wxrc, zip question

When I try to run wxrc, it fails complaining about the absence of zip executable and mentions that it can be downloaded from http://www.cdrom.com/pub/infozip where it doesn't currently exist. What is the recommended alternative?

Thanks.
by Victory
Sun Oct 16, 2011 10:08 am
Forum: C++ Development
Topic: Getting parent sizer
Replies: 2
Views: 1744

Re: Getting parent sizer

Thanks "catalin".
by Victory
Sun Oct 16, 2011 6:47 am
Forum: C++ Development
Topic: Getting parent sizer
Replies: 2
Views: 1744

Getting parent sizer

Is there an easy way to get the parent wxSizer for a given sizer? My UI is created from XRC and I already have a pointer to a sizer (Let us call it pSizer1). I need to get the pointer to the sizer enclosing this sizer. I believe a function along the following lines would achieve that. But, I am wond...