Search found 25 matches

by Morat20
Wed Mar 20, 2019 6:58 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 74

Re: Menu accelerator issue

ONEEYEMAN wrote:
Wed Mar 20, 2019 5:00 pm
Hi,
Just try to search globally for 'wxKeyEvent'...

Thank you.
Thanks. That did it. Apparently a coworker wrote in a test function for some reason and didn't remove it or document it, and it was capturing the control events.

Thanks for the help all.
by Morat20
Wed Mar 20, 2019 4:49 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 74

Re: Menu accelerator issue

ONEEYEMAN wrote:
Wed Mar 20, 2019 4:42 pm
Hi,
As doublemax suggested - do you have any keyboard events intercepted?
Thank you.
I'm almost certain it is being interrupted, but I've been unable to find it so far. That's the only thing I can think of to describe the problem.
by Morat20
Wed Mar 20, 2019 3:46 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 74

Re: Menu accelerator issue

Windows 7, and yes the samples work. I'm at a total loss. I can't think of any obvious reason either. I assume the event handlers work when you invoke the menu items directly? Do you have any key event handlers? Either try to reproduce the issue in a minimal sample or try stripping down your code u...
by Morat20
Tue Mar 19, 2019 10:41 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 74

Re: Menu accelerator issue

doublemax wrote:
Tue Mar 19, 2019 10:30 pm
Which platform?
Did you check any of the samples that use keyboard shortcuts with "Ctrl"? E.g. the "stc" sample does.
Make a test with wx 3.x. If it works there, it means there was a bug in 2.9.5 that has been fixed by now.
Windows 7, and yes the samples work. I'm at a total loss.
by Morat20
Tue Mar 19, 2019 10:17 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 74

Menu accelerator issue

Using wxWidgets 2-9-5 (yes, I know it's old but it's what I have to work with), I seem to be running into the strangest issue with menu accelerators. Using the alt+ works, but not Ctrl+. Any menu item whose shortcut starts with "Alt" works correctly. None of the ones with "Ctrl" do. At this point, I...
by Morat20
Wed Jan 30, 2019 4:23 pm
Forum: C++ Development
Topic: Sizer's question
Replies: 3
Views: 88

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

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

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

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

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

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

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

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

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

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...