After inserting a wxListCtrl in a wxSmith dialog this assert gets triggered:
wxListCtrl style should have exactly one mode bit set
the cause is the missing style bit in the preview, because the default style is 0
Does someone know how to set a default style for wxSmith items?
In wxslistctrl.cpp, line 31 change
to (for example)
but you will get the same exception when you try to change the style, as this always violates the "exactly one mode bit set" rule. To fix this, in OnBuildPreview() if Style() & wxLC_MASK_TYPE is 0 youu can use a default value, and if it has more than one bit set then select one of them with some priority crtieria (top to bottom?)
Something like this (sorry for the code style)
This will fix the asserts, but the generated code will produce asserts if the selected style is invalid; anyway, the ball is now in the user side.
i totally missed that..
or some message box with a warning?
I am totally on your side here xD
This is the patch with the proposed changes.
Thanks for contribution.