Author Topic: WXSMITH + wxPanel + wxButton  (Read 3994 times)

Offline codemania

  • Multiple posting newcomer
  • *
  • Posts: 19
WXSMITH + wxPanel + wxButton
« on: December 09, 2006, 03:48:22 am »
Hi!

I would like to work with wxSmith in codeblocks, but when i insert a button in the wxFrame, or in wxPanel the size of the working space minimizes. I want to know how to work better with it, how to increase the frame (mouse or writing values) and then how to put a wxButton anywhere on the frame (with mouse or writing values).

WindowsXP: wxWidgets 2.6.3, codeblocks CB_20061208_rev3359_win (last one),...

In wxDev-c++ (6.10) is simple:
(wxWidgets 2.7.1)
1) I create a New Project.
2) I choose "wxwidgets frame".
3) On the tab "...frm.wxform": I insert a wxPanel,  next, I insert wxButton.
It's ok, and I can move my button with the mouse anywhere on wxFrame.

Thanks for the answers.
Sorry my English
« Last Edit: December 09, 2006, 03:55:36 am by codemania »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: WXSMITH + wxPanel + wxButton
« Reply #1 on: December 09, 2006, 03:26:10 pm »
Hi

Thanx for interesting in wxSmith :)

First think is that the version of wxSmith you use (included in nightlies) which I call "old" os little bit outdated. I'm working on new version (almost rewritten from scratch), just few weeks and it should be done. The problem is that old version doesn't handle few things - like size of wxPanel. In fact it automatically calculates panel's size to cover all chilren (it's automatically done by wxWidgets). So currently there's no solution when inserting items drectly to panel.

But I hope you've heard something about sizers in wxWidgets - wxSmith works perfectly with them. If you don't think anything about it, just in few words: they're automatically positioning and resizing items and will set size for panel automatically. There's more info on http://www.wxwidgets.org/manuals/2.6.3/wx_sizeroverview.html#sizeroverview

Unfortunately the ability to freely resize root widgets (like wxFrame) will be implemented in new version of wxSmth only.

Regards
   BYO


Offline codemania

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: WXSMITH + wxPanel + wxButton
« Reply #2 on: December 10, 2006, 03:08:15 am »
Thanks Byo for your help.