Author Topic: wxGridBagSizer pluin  (Read 19875 times)

sunwukong

  • Guest
wxGridBagSizer pluin
« on: March 17, 2011, 11:10:24 pm »
Hi.

First of all, I'm a french guy. So I may not understand you and you may not understand me. Sorry for the errors I will make with my english (I use no translator).

For a personnal projet, I have thought that using a wxGridBagSizer item in wxSmith would be cool. I haven't found a plug-in that add this in CB so I've decided to create it myself. While I was trying to know how to do, it appears to me that I have two options :
- write a independant plug-in and work without modifying the existing things
- add a new feature in the wxSmith project (this mean in theory : modifying 4 files that already exist + adding 2 new files)

I have chosen the first (even if I think it is the worst way). Just because I only have to copy 2 files in the plug in directory of a nightly build instead of getting the CB source code and compile it with my new files. I wil try the second one later.

You can find the source code and the binaries for windows here : http://sun.wu.kong.free.fr/download/.

There is 4 problems with it :
- warnings while compiling the xpm files
- I have no idea on what to do when two (or more) items have the same position in the sizer
- I only have windows so it is not tested on other OS
- I am not a pro coder in C/C++ so I think I have done a lot of errors that I can't see

It works enough for me but I will be happy if you have coments or ideas.
« Last Edit: March 17, 2011, 11:28:44 pm by sunwukong »

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxGridBagSizer pluin
« Reply #1 on: March 20, 2011, 03:49:03 am »

 Hi there,

I have been working extensively on wxSmith over the last year or so. I have almost got the wxGridBagSizer working there but have left it on hold recently due to some implementation difficulties. It will be done sometime soon-ish. In the meantime, go for it.

Cheers,

 Cryo.
 

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #2 on: July 17, 2012, 07:52:07 am »
What about the possibility right now about adding wxGridBagSizer into wxSmith ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #3 on: July 17, 2012, 08:32:22 am »
What about the possibility right now about adding wxGridBagSizer into wxSmith ?

Please do not cross-post !

Which version of C::B do you useon (which platform ?

I have wxGridBagSizer in my C::B's on linux with svn r8133 (actually nightly for debian, fedora and redhat/centos on my server).

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #4 on: July 18, 2012, 07:02:38 pm »
What about the possibility right now about adding wxGridBagSizer into wxSmith ?

Please do not cross-post !
Sorry for my crossing post and for digging old threads.... Done on morning, quickly before going to work...

Which version of C::B do you useon (which platform ?

I have wxGridBagSizer in my C::B's on linux with svn r8133 (actually nightly for debian, fedora and redhat/centos on my server).
If you have it is extremly recent one, I use Code::Blocks nighlt build 8086 in windows platforms...
Some post explain this needs 4 years ago, it seems to be complex to add this feature into wxSmith...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #5 on: July 18, 2012, 07:05:46 pm »
If you have it is extremly recent one, I use Code::Blocks nighlt build 8086 in windows platforms...

It should be there, in he layout tab of wxsmith.

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #6 on: July 19, 2012, 06:40:26 am »
No, I have
- Spacer
- wxBoxSizer
- wxFlexGridSizer
- wxGridSizer
- wxSplitterWindow
- wxStaticBoxSizer
- wxStdDialogButtonSizer

And that's all, no wxGridBagSizer... Strange, perhaps in more recent nightly build (when it will be published).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #7 on: July 19, 2012, 06:56:39 am »
It's in trunk since revision 7635 (merge with wxSmith-branch), so it should definitely be in the nightly.
I will test on windows later the day, if I am at work.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxGridBagSizer pluin
« Reply #8 on: July 19, 2012, 07:30:14 am »
No, I have
- Spacer
- wxBoxSizer
- wxFlexGridSizer
- wxGridSizer
- wxSplitterWindow
- wxStaticBoxSizer
- wxStdDialogButtonSizer

And that's all, no wxGridBagSizer... Strange, perhaps in more recent nightly build (when it will be published).
I have wxGridBagSizer in the wxSmith toolbar. (winXP, latest nightly build)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #9 on: July 19, 2012, 11:17:33 am »
I have created my wxSmith GUI with old version because I'm working on this project for 18 months.
I update by overwrite CodeBlocks folder with new Nightly build.
May be I need to modify a version of wxSmith file or other configuration file somewhere ?

Strange to don't see this kind of sizer.
How kind of wxSmith sizer do you have and in what order ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #10 on: July 19, 2012, 11:26:23 am »
I update by overwrite CodeBlocks folder with new Nightly build.
Overwriting might not be enough, if the api or the library-layout has changed.
Normally it's save to empty the Code::Blocks executable folder and copy the nightly files into it.
If the compiler is also installed below the C::B folder, it should not be removed of course.
You can also copy the nightly into a new folder and start it from there, to see whether it has the gridbagsizer or not.

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #11 on: July 19, 2012, 08:28:51 pm »
I created a new empty Code::blocks folder but always the same. Sure wxSmith contains wxGridBagSizer layout for SVN 8086 Windows version ?
............ yes..........
I have tryed to create an empty project, I have a lot of differents layout !
- Spacer
- wxBoxSizer
- wxFlexGridSizer
- wxGridBagSizer
- wxGridSizer
- wxSashLayoutWindow (don't knwow what it is)
- wxSashWindow (don't knwow what it is)
- wxSplitterWindow
- wxStaticBoxSizer
- StdDialogButtonSizer

I sayed, YES !!!!
Look more ... create a new panel... and have only previous sizer.... In fact, the wxGridBagSizer is avalaible *ONLY* for wxDialog component, not for wxPanel based.... why ? Strange....

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #12 on: July 19, 2012, 08:56:42 pm »
Look more ... create a new panel... and have only previous sizer.... In fact, the wxGridBagSizer is avalaible *ONLY* for wxDialog component, not for wxPanel based.... why ? Strange....
I have wxGridBagSizer for dialog, scrollingdialog, frame and panel. And it doesn't matter whether the project is created dialog- or frame-based or initially empty.

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
Re: wxGridBagSizer pluin
« Reply #13 on: July 19, 2012, 09:20:59 pm »
Jens, I think I'm cursed ! Isn't it ?
I'm using wxWidgets 2.9.3, do you think it could be a problem with it ?
I let a small sample to download
« Last Edit: July 19, 2012, 09:26:02 pm by Feneck91 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxGridBagSizer pluin
« Reply #14 on: July 19, 2012, 10:47:49 pm »
Jens, I think I'm cursed ! Isn't it ?
I'm using wxWidgets 2.9.3, do you think it could be a problem with it ?
I let a small sample to download
Now I can confirm this issue, it's neither related to wxPanel nor to wxWidgets 2.9, but to the use of the xrc-file for the new window.
Without xrc the gridbagsizer is there, with xrc it's missing.