// * wxsmith
main code
// * wxsmith
// *wxsmith-layout
the layout code
// *wxsmith-layout
Do you want to have control if wxsmith would generate the fit/layout for the top level windows?Ideally. For example I quite often create panels in wxSmith which are then used in multiple windows. Calling Fit/Layout in them is redundant.
I suppose we could separate the fit code in a separate section, so the user can just delete it or comment it out.That sounds like a good idea. How would it cope with existing code? Currently all of the creation code is marked with
My knowledge of the internals of wxSmith is pretty much zero but I'll take a look. I downloaded the CodeBlocks source but for some reason my built executable won't run. I get 'This application was unable to start correctly (0xc000007b)'. As far as I can figure out it appears to be a 32 bit/64 bit mixup somewhere but I have yet to figure out where.Told us how you build the C::B(compiler, wx version and steps), I think we can help you to solve this issue.
I'm pretty sure this would break things for existing users, but I'm not sure if it is a concern.
The second point would require us to have a clear explanation why having Fit+Layout for panels is detrimental.wxSizer::SetSizeHints https://docs.wxwidgets.org/3.0/classwx_sizer.html#abc460cd0e2bb3bde72142fdb434bc546 (https://docs.wxwidgets.org/3.0/classwx_sizer.html#abc460cd0e2bb3bde72142fdb434bc546) lays out the window then fixes the window's minimum and maximum sizes based on the current layout. To quote the wxWidgets docs 'This only makes sense when window is actually a wxTopLevelWindow such as a wxFrame or a wxDialog'.
Do you have an example or link to documentation?
Told us how you build the C::B(compiler, wx version and steps), I think we can help you to solve this issue.
As I mentioned in a previous post the issue is that there are loads of copies of libstdc++-6.dll on my machine, both 32 bit and 64 bit. I have many open source applications installed and apparently many were built with MinGW. CodeBlocks even installs 3 copies.generally it is a bad idea to have all this in path...
I am currently getting around the problem by running CodeBlocks from a command prompt with PATH just set to point to MinGW and the wx dlls.
Ah it seems you're not using flTopLevel, so the property is never visible...Huh. I just checked the patch and it looks like I messed up somewhere. There are some files missing from the patch. That explains why the property was missing from your frame.
If I use the code generated by the patched cb the min size of the window is not set, so I can shrink it smaller then the content.
I have "Default min size" checked.
If I use the code generated by the patched cb the min size of the window is not set, so I can shrink it smaller then the content.I just tested a frame and with 'Lay out the window' turned off you can resize the frame to any size you want. With it on (the default) you can't resize below the minimum size that fits all controls. That is the expected behaviour.
I have "Default min size" checked.
I'm always confused by this min size stuff, so I don't know if this is a regression or not but it is a change in behaviour.
1. Descriptive commit message. I can gather one from the topic, but I'd be happier if you can provide one.Changes to wxSmith code generation:
2. A real name or nickname. I like to give credit to people who provide patches and svn doesn't allow separation between author and committer name, so I write it down in the commit message.Les Newell
3. A description for the tooltip for the "Lay out the window" property.Automatically lay out the window. If disabled you must call Layout(), Fit() or SetSizeHints() in your code.
Just a note: You've messed up the load/save of the layout property, but I've fixed it. Re using parent_arg wasn't a good idea. ;)Yeah, copy and paste isn't always your friend. The last patch fixes this. If you changed it yourself, please use the name 'layout_window' so it doesn't break a project I'm already using this on.
I have no time or knowledge to add tooltips for all properties, but this is a start to show how it is done.Yes, that's quite a bit of work. That's why I wan't to keen on adding tool tips.
Patches welcome. Ideally we should add for all of them.