Search found 32 matches

by Morat20
Mon Apr 01, 2019 11:03 pm
Forum: C++ Development
Topic: Issue saving bitmaps to file
Replies: 6
Views: 112

Re: Issue saving bitmaps to file

Hi, Does the original image has an Alpha? Also - what platform are you trying this on? And how did you build wxWidgets? Thank you. I believe the problem is Alpha. Loading: MyStaticBitmap->SetBitmap(wxBitmap("myBitmap",wxBITMAP_TYPE_RESOURCE)); wxImage image = MyStaticBitmap->GetBitmap().ConvertToIm...
by Morat20
Mon Apr 01, 2019 10:18 pm
Forum: C++ Development
Topic: Issue saving bitmaps to file
Replies: 6
Views: 112

Re: Issue saving bitmaps to file

The code looks OK, I am assuming you are running debug build of wxWidgets which would assert if the bitmap or image were invalid. My guess would be that the issue is somewhere else than in the posted code (assuming you did not omit anything relevant) and you would not be able to reproduce it in an ...
by Morat20
Mon Apr 01, 2019 10:06 pm
Forum: C++ Development
Topic: Issue saving bitmaps to file
Replies: 6
Views: 112

Re: Issue saving bitmaps to file

Hi, Does the original image has an Alpha? Also - what platform are you trying this on? And how did you build wxWidgets? Thank you. Windows 7, wxWidgets 2.9.5, static libraries. And I have no idea of the original images have an alpha. They predate me by some time. For that matter, I'm not even sure ...
by Morat20
Mon Apr 01, 2019 9:17 pm
Forum: C++ Development
Topic: Issue saving bitmaps to file
Replies: 6
Views: 112

Issue saving bitmaps to file

Attempting to save a static bitmap to file generates an all black result (whether saved as bitmap, jpg, etc). I Here's the stripped down broken version. The bitmaps come from the resource file. //This bit declared elsewhere wxStaticBitmap myBitmap->SetBitmap(wxBitmap("useful_bitmap",wxBITMAP_TYPE_BM...
by Morat20
Mon Mar 25, 2019 4:49 pm
Forum: C++ Development
Topic: wxGrids and sizers question
Replies: 1
Views: 43

wxGrids and sizers question

I seem to have a reoccurring problem with wxGrids and being placed in sizers. I'll defined the grid minimum and maximum size, place it in the sizer, call the Layout() and the result looks correct. The wxGrid will show scrollbars, fit inside the frame, and not extend past the edge of the frame. Excep...
by Morat20
Thu Mar 21, 2019 10:30 pm
Forum: C++ Development
Topic: Sizers and resizing the main frame question
Replies: 2
Views: 53

Re: Sizers and resizing the main frame question

I think I may have found the problem. Or rather, realized the problem is not with the wxTextControl or the set of sizers I've been looking at. I'm using a wxNotebook, and the problem I am diagnosing is on the last tab of the notebook. However, on another tab of the notebook, the same problem is happ...
by Morat20
Thu Mar 21, 2019 9:47 pm
Forum: C++ Development
Topic: Sizers and resizing the main frame question
Replies: 2
Views: 53

Sizers and resizing the main frame question

There's something odd I've noticed a few times, and I suspect I'm doing something wrong with sizers to cause it. I'll create a frame, fill it with controls using sizers, and everything will lay out fine. Until I resize the frame, even if just a little. Suddenly controls will jump out past the "edge"...
by Morat20
Wed Mar 20, 2019 6:58 pm
Forum: C++ Development
Topic: Menu accelerator issue
Replies: 8
Views: 109

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

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

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

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

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

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

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

Re: Question about scrollbars

Ah, came up with a cheap workaround.

Replaced the mainPanel with a wxScrolledWindow. It scrolls the area that needs it.