User forums > General (but related to Code::Blocks)

Warning message when usign Expand

(1/2) > >>

Wanderer82:
Hi

I'm an absolute beginner trying to fiddle around with wxWidgets and CodeBlocks. In my program, besides the standard wxFrame, I created one wxdialog, wxBoxSizer1, wxPanel, wxGridSizer, five wxCheckBoxes and a wxButton. I wanted to align the boxes and the button using the "Expand" setting. My program works fine until I use the "Expand" setting on the wxPanel only or also when I use it on the wxCheckBoxes. When I do that an error message shows up when I open the Dialog by clicking on the button in wxFrame. It says:

wxWidgets Debug Alert

../../src/common/sizer.cpp(2116): assert "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL))" failed in DoInsert(): Vertical alignment flags are ignored with wxEXPAND
Do you want to stop the program?

Why is that and what can I do to get rid of it?

Thanks a lot
Thomas

Jenna:

--- Quote from: Wanderer82 on June 18, 2016, 07:17:35 pm ---Hi

I'm an absolute beginner trying to fiddle around with wxWidgets and CodeBlocks. In my program, besides the standard wxFrame, I created one wxdialog, wxBoxSizer1, wxPanel, wxGridSizer, five wxCheckBoxes and a wxButton. I wanted to align the boxes and the button using the "Expand" setting. My program works fine until I use the "Expand" setting on the wxPanel only or also when I use it on the wxCheckBoxes. When I do that an error message shows up when I open the Dialog by clicking on the button in wxFrame. It says:

wxWidgets Debug Alert

../../src/common/sizer.cpp(2116): assert "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL))" failed in DoInsert(): Vertical alignment flags are ignored with wxEXPAND
Do you want to stop the program?

Why is that and what can I do to get rid of it?

Thanks a lot
Thomas

--- End quote ---
Do you use wxWidgets 3.x ?
You can not use this combination of alignment-flags in wx3 as the message clearly states.
If you remove wxALIGN_CENTRE_VERTICAL it should work.

Wanderer82:
Hi and thanks for the fast reply

That's right, I use wxWidgets 3.0.2. I wonder why I can't remove the alignment in the left-hand window just under resources. It says "horizontal align" and "vertical align" but there's no option to remove the setting, I can only choose from left, center, right. I thought I can manage these things there. So what you say would be to change the setting directly in the code, right?

NEWS:

Trying to remove the setting in the Code... that did work but at the every time I change anything else in the settings for the checkBoxes the code will be back in place.

oBFusCATed:
What version of Code::Blocks are you using?

Wanderer82:
13.12

I have to say that I have irregular errors when starting new projects and try to compile them without any changements. I had version 16 before and the problems were the same. Also on my laptop they're the same. Moreover my compiled programs take about 15-30 seconds (execution time) until they start... not only with the first start but always. These things make me even more unsure whether some errors / warnings etc. are my fault or another problem.

Navigation

[0] Message Index

[#] Next page

Go to full version