Search found 32 matches

by Morat20
Tue Jan 29, 2019 5:46 pm
Forum: C++ Development
Topic: Question about scrollbars
Replies: 1
Views: 62

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: 890

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: 890

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: 890

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: 890

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: 890

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: 890

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: 890

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: 983

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: 983

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: 983

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: 983

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...
by Morat20
Tue Apr 15, 2014 10:12 pm
Forum: C++ Development
Topic: Heap Corruption with a wxScrolledWindow (2.9.5)
Replies: 6
Views: 983

Heap Corruption with a wxScrolledWindow (2.9.5)

I've been updating a wxWidgets module from 2.8.9 to 2.9.5. Everything went dandy until I actually ran the thing, wherein it crashed on exit with access violations and heap corruption warnings. And it breaks in the wxSizer() destructor. Now I'd seen that issue previously (there were GUI elements adde...
by Morat20
Wed Jan 08, 2014 12:11 am
Forum: C++ Development
Topic: Question regarding wxToolBar
Replies: 6
Views: 931

Re: Question regarding wxToolBar

That makes a certain sense, and would explain a few graphical oddities I've encountered. I'd still LIKE the option of adding borders around those buttons, but unless someone has a bright idea I'll have to go play with the colors or add some text or seperators or something to get a more clear seperat...
by Morat20
Tue Jan 07, 2014 11:18 pm
Forum: C++ Development
Topic: Question regarding wxToolBar
Replies: 6
Views: 931

Re: Question regarding wxToolBar

The toolbar example has the same "no borders" look (with borders visible on mouse-over"). It looks much cleaner because the example uses a bitmap+text approach, but the bitmap button behavior is the same. (bitmaps, no borders). I admit to being a bit fuzzy on manifests -- the old .rc file is identic...