You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded and installed the latest version of Windows 10 a few days ago.
For the project, I set Python code generation.
I added Frame
I added BoxSizer
I added wxStaticText
If I click on a button with functionality:
After generating the program code and adding these lines below to the program file (gui4.py):
app = wx.App()
frame = MainFrame(None).Show()
app.MainLoop()
I see that the program does not start and there is a description in the console:
Traceback (most recent call last):
File "j:\LUA\GUI\wxFormBuilder\test\a2\gui4.py", line 44, in
frame = MainFrame(None).Show()
File "j:\LUA\GUI\wxFormBuilder\test\a2\gui4.py", line 31, in init
bSizer1.Add( self.HelloText, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
wx._core.wxAssertionError: C++ assertion "CheckSizerFlags(!((flags) & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)))" failed at ....\src\common\sizer.cpp(2294) in wxBoxSizer::DoInsert(): wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL will be ignored in this sizer: wxEXPAND overrides alignment flags in box sizers
DO NOT PANIC !!
If you're an end user running a program not developed by you, please ignore this message, it is harmless, and please try reporting the problem to the program developers.
You may also set WXSUPPRESS_SIZER_FLAGS_CHECK environment variable to suppress all such checks when running this program.
If you're the developer, simply remove this flag from your code to avoid getting this message. You can also call wxSizerFlags::DisableConsistencyChecks() to globally disable all such checks, but this is strongly not recommended.
The text was updated successfully, but these errors were encountered:
This is an assertion, in an C++ application this would popup a dialog, a Python application apparently gets terminated by this.
You used an invalid combination of sizer flags for an item inside that BoxSizer. Most probably you used alignment flags that affect the main layout direction of the sizer or you used any alignment flags together with wxEXPAND, this is not allowed. In the wxWidgets documentation you can find how to use sizer and how these flags work for different sizer types.
https://www.slideshare.net/UmarYusuf2/wxformbuilder-tutorial-on-a-gui-for-making-guis-for-python
On the page 9 it says "wxAlign_Center", And I chose the item: "wxAlign_Center_Horizontal". Probably due to the fact that this instruction is for an older version of the program and I did not know which item to choose correctly.
At the moment I need a hint what to choose in this box in order to be correct.
I downloaded and installed the latest version of Windows 10 a few days ago.
For the project, I set Python code generation.
If I click on a button with functionality:
After generating the program code and adding these lines below to the program file (gui4.py):
app = wx.App()
frame = MainFrame(None).Show()
app.MainLoop()
I see that the program does not start and there is a description in the console:
Traceback (most recent call last):
File "j:\LUA\GUI\wxFormBuilder\test\a2\gui4.py", line 44, in
frame = MainFrame(None).Show()
File "j:\LUA\GUI\wxFormBuilder\test\a2\gui4.py", line 31, in init
bSizer1.Add( self.HelloText, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
wx._core.wxAssertionError: C++ assertion "CheckSizerFlags(!((flags) & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)))" failed at ....\src\common\sizer.cpp(2294) in wxBoxSizer::DoInsert(): wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL will be ignored in this sizer: wxEXPAND overrides alignment flags in box sizers
DO NOT PANIC !!
If you're an end user running a program not developed by you, please ignore this message, it is harmless, and please try reporting the problem to the program developers.
You may also set WXSUPPRESS_SIZER_FLAGS_CHECK environment variable to suppress all such checks when running this program.
If you're the developer, simply remove this flag from your code to avoid getting this message. You can also call wxSizerFlags::DisableConsistencyChecks() to globally disable all such checks, but this is strongly not recommended.
The text was updated successfully, but these errors were encountered: