Why is wxwidgets bad on codeblocks?

closed account (23h0pfjN)
Whenever i try to to make a gui its realy hard and this is why:
Placing things in the GUI. Its realy hard i cant seem to make it place where i want to i place a panel then the layout and it dosent easily place it where i want. Also i went through this and the only one(http://wiki.codeblocks.org/index.php?title=WxSmith_tutorials).
This is the main reason why i dont like it, also can you:
1.Suggest another gui c++ making program.
2.If wrong tell me how to fix it please.
3.Could i use VS c++ for my gui and codeblocks for other? Will i get messed up?
Thank you for helping me if you can.
When I use wxWidgits with wxSmith and Code::Blocks, I have no issues with it at all. Prehaps with a few more details on what your doing with it, I could identify any errors you are making. But regardless, I would not suggest relying on wxSmith. Writing your own code is alot more rewarding.
I'd suggest you to stop using a graphical GUI generator and instead use layout managers (they're called "sizers" in wxWidgets) instead - rather than specifying at which location an element is supposed to be, you can specify things like "order these elements in a grid" etc. Much easier to think about, and much easier to adapt too.

If you insist on using a WYSIWYG editor and absolute positioning - just place the buttons etc roughly where you want them, and then do the finer controls by directly manipulating the coordinates.
Last edited on
wxFormBuilder is most commonly used GUI editor for wxwidgets and works with every compiler suite (it is a separate program that generate .cpp and .h files for you) and is much more advanced than wxSmith Code::Blocks plugin which btw has a few nasty bugs in it.

Layout managers can also be created using wxFormBuilder, though they does not work as intended without manual editing generated source code.
closed account (23h0pfjN)
Alright first i use the sizers and also the grid ill tell you the tree:

wxFrame-->GuiFrame(Thats what i called the project)-->wxFrame-->wxPanel-->wxGridsizer-->wxButton.

The problem is when i try to resize the program it half the time wont let me, and also when i try to put the button i a specific place it dosent let me(i drag it and it goes back to its old place) also when i try too put something beneath the button it wont let me and just goes to the side.

I will look into the wxFormBuilder.

Soory for my bad english.
You should read some sizers tutorials. You need to add a minimum of controls inside them to show the effects (there are tricks like adding hidden controls if you don't need it all).

Also check their options to customize the behavior.

The problem is when i try to resize the program it half the time wont let me, and also when i try to put the button i a specific place it dosent let me(i drag it and it goes back to its old place) also when i try too put something beneath the button it wont let me and just goes to the side.


That's why they're called layout managers.
closed account (23h0pfjN)
so how could i change the layout that it would work normaly?
If you're using a sizer, you obviously can't specify the absolute coordinates of it's child widgets anymore (anything else would sorta defeat the purpose of having one in the first place). If you really really want that much fine grained control you will have to use absolute coordinates, but really once you get used to them you can create pretty much any layout you want using sizers - much quicker and more portable too,
Topic archived. No new replies allowed.