Search found 35 matches

by Morat20
Wed Jan 30, 2019 4:23 pm
Forum: C++ Development
Topic: Sizer's question
Replies: 3
Views: 152

Re: Sizer's question

Thanks. That covered what I needed to move forward and saved me a few hours of experimentation. Honestly, the ideal solution to the legacy issue I'm facing would beto use z-order positioning with two separate panels and just swap which one is top, but I don't think I can do that in wxWidgets inside ...
by Morat20
Wed Jan 30, 2019 12:30 am
Forum: C++ Development
Topic: Sizer's question
Replies: 3
Views: 152

Sizer's question

Is it possible to change a sizer's flags after the creation of a sizer? Say I wanted a horizontal BoxSizer to expand only under certain circumstances, or wanted to add and remove the wxRESERVE_SPACE_EVEN_IF_HIDDEN flag? Secondly, what are the limitations of the wxRESERVE_SPACE_EVEN_IF_HIDDEN? Will i...
by Morat20
Tue Jan 29, 2019 6:29 pm
Forum: C++ Development
Topic: Question about scrollbars
Replies: 1
Views: 77

Re: Question about scrollbars

Ah, came up with a cheap workaround.

Replaced the mainPanel with a wxScrolledWindow. It scrolls the area that needs it.
by Morat20
Tue Jan 29, 2019 5:46 pm
Forum: C++ Development
Topic: Question about scrollbars
Replies: 1
Views: 77

Question about scrollbars

General theory question: I've been tasked with updating some legacy code. One of the things I want to do is make the frame scrollable. However, I'm stuck on a bit of a problem, in that I can't inherit wxScrolledWindow, because the code in question already uses a custom frame class that extends wxFra...
by Morat20
Fri May 25, 2018 9:02 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

Do you happen to have a link on how BestSize (and InitialSize) are used by wxWidgets when doing dynamic layouts? Not really, only this: http://docs.wxwidgets.org/trunk/overview_sizer.html But there is not much to know anyway. All controls have 3 sizes that are used by the sizer algorithm: A "best" ...
by Morat20
Fri May 25, 2018 7:58 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

I simply don't understand why the sizer isn't taking into account the scrollbar height when it's being laid out. It's not the sizer's fault. wxGrid reports a "best size", that's the size needed to display everything without scrollbars. The problem in your case is that the content fits in one direct...
by Morat20
Fri May 25, 2018 6:51 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

Does GetDefaultRowSize() adjust for font size? Probably not. But if you have so few rows, you can get each individual row height with wxGrid::GetRowSize ( row ). Yeah, I can work around all that. I'll have to grab a cell, check it's height, check the height of the label, get the scrollbar height, f...
by Morat20
Fri May 25, 2018 6:39 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

doublemax wrote:How many items does the grid typically have? Maybe you can calculate and set a reasonable minimum height based on wxGrid::GetDefaultRowSize().
Between 1 and 4 rows, either of 7 or 16 columns.

Does GetDefaultRowSize() adjust for font size?
by Morat20
Fri May 25, 2018 6:27 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

How about adding the wxALWAYS_SHOW_SB style flag as a workaround? If I add that to the grid, the grid then works perfectly -- all rows shown, even as I add rows. Of course, I can't get to half the columns now (the horizontal scrollbar should be there). So at least that confirms the problem -- for s...
by Morat20
Fri May 25, 2018 5:44 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

Re: wxGrid and wxSizer issue

Can you try to create a small, compilable sample or at least show a screenshot? Probably unrelated, but still worth mentioning: The wxALIGN_* flags and wxEXPAND are mutually exclusive. In newer wxWidgets version this should have caused an assert. Which wxWidgets version are you using? Flags like wx...
by Morat20
Fri May 25, 2018 5:00 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue
Replies: 15
Views: 975

wxGrid and wxSizer issue

I seem to be making a simple mistake somewhere in my sizers dealing with a single grid. That grid, which may be one or more rows, is "wider" than the the vertical column it's embedded into, so it correctly creates a horizontal scrollbar. The problem is that scrollbar promptly covers the last row of ...
by Morat20
Wed Apr 16, 2014 4:07 pm
Forum: C++ Development
Topic: Heap Corruption with a wxScrolledWindow (2.9.5)
Replies: 6
Views: 1000

Re: Heap Corruption with a wxScrolledWindow (2.9.5)

That solved it. It now crashes on another static event calling another class. I'll just have to move them all to avoid the crashes. Thank you. It would have taken me a VERY long time to look at the events, rather than focusing on the sizers thinking there was some double-parented sizer in there some...
by Morat20
Wed Apr 16, 2014 2:10 pm
Forum: C++ Development
Topic: Heap Corruption with a wxScrolledWindow (2.9.5)
Replies: 6
Views: 1000

Re: Heap Corruption with a wxScrolledWindow (2.9.5)

Thanks, I'll try that out. It wouldn't have occurred to me to even check the events, I was preoccupied with the sizers. In fact, I was considering replacing the idiotic sizer arrays with individual sizers and seeing if I could trace the problem better that way. (I'm pretty sure it's complaining abou...
by Morat20
Tue Apr 15, 2014 11:19 pm
Forum: C++ Development
Topic: Heap Corruption with a wxScrolledWindow (2.9.5)
Replies: 6
Views: 1000

Re: Heap Corruption with a wxScrolledWindow (2.9.5)

MyApp!_free_dbg_nolock(void * pUserData=0x02f838d0, int nBlockUse=1) Line 1415 + 0xb bytes C++ MyApp!_free_dbg(void * pUserData=0x02f838d0, int nBlockUse=1) Line 1258 + 0xd bytes C++ MyApp!operator delete(void * pUserData=0x02f838d0) Line 54 + 0x10 bytes C++ MyApp!operator delete[](void * p=0x02f83...
by Morat20
Tue Apr 15, 2014 10:55 pm
Forum: C++ Development
Topic: Heap Corruption with a wxScrolledWindow (2.9.5)
Replies: 6
Views: 1000

Re: Heap Corruption with a wxScrolledWindow (2.9.5)

2.9.5 -- because I got the go-ahead to update that before 3.0 was released, and given some of our older legacy models date back to 2.3 and prior, I didn't push to go into 3.0 because I really don't want to deal with even more Unicode fixes. 3.0 doesn't really have anything we need, and I was under t...