Author Topic: Warning message when usign Expand  (Read 2631 times)

Offline Wanderer82

  • Single posting newcomer
  • *
  • Posts: 8
Warning message when usign Expand
« 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


Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Warning message when usign Expand
« Reply #1 on: June 18, 2016, 08:14: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
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.

Offline Wanderer82

  • Single posting newcomer
  • *
  • Posts: 8
Re: Warning message when usign Expand
« Reply #2 on: June 18, 2016, 08:41:22 pm »
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.
« Last Edit: June 18, 2016, 08:46:05 pm by Wanderer82 »

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12084
    • Travis build status
Re: Warning message when usign Expand
« Reply #3 on: June 18, 2016, 10:59:22 pm »
What version of Code::Blocks are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Wanderer82

  • Single posting newcomer
  • *
  • Posts: 8
Re: Warning message when usign Expand
« Reply #4 on: June 18, 2016, 11:48:19 pm »
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.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Warning message when usign Expand
« Reply #5 on: June 18, 2016, 11:59:45 pm »
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.
The startup time of the compiled program has not much to do with the IDE you used to compile it, but probably with the toolkit you use (wxWidgets ?) and (more likely) with the code or the compiler you use or some kind of third party software on your system.

Nevertheless, with 16.01 you should not be able to set the incorrect flags anymore with the  wxSmith-plugin.

Offline Wanderer82

  • Single posting newcomer
  • *
  • Posts: 8
Re: Warning message when usign Expand
« Reply #6 on: June 19, 2016, 12:21:54 am »
Yeah, I already thought that the startup time must have something to do with compiling wxWidgets using Mingw. I used Unicode=1, Shared=1, Build=release, Monolithic=1. And I wrote something wrong. I use wxWidgets 3.1.0. I tried to compile 3.0.2 (stable version) but got an error during compilation.

I have a naked Windows 10 64 bit. No additional antivirus software or so.

By the way: Even new projects with no additional code written by me take 10-30 seconds to execute. So I don't think it has something to do with the code.
« Last Edit: June 19, 2016, 12:36:05 am by Wanderer82 »