Author Topic: [wxSmith]: Re-order existing controls  (Read 3114 times)

Offline klight

  • Multiple posting newcomer
  • *
  • Posts: 24
[wxSmith]: Re-order existing controls
« on: May 09, 2007, 08:23:15 pm »
The recent post about cut/copy/paste crashes when designing in wxSmith has made me wonder about a missing a feature in wxSmith...

I seem to remember in the previous wxSmith design that the control order could be changed by dragging the controls to a different position on the Resources tree in the Management window.  This "feature" is missing in the current version.  While I realize that I can drag the controls in the design view, sometimes this doesn't work as expected.  Cut/Paste sometimes does the trick but not always.

My problem usually comes up when I realize that I should have an additional sizer box to re-group my controls.  The real problem is that when a wxBoxSizer is dropped in the designer, it's size is "0" so there is no way to drag my existing controls/sizers into this new sizer.  Worse yet is trying to drop controls into a sizer containing existing controls as the order of the controls as dropped is never what I want so I wind up dropping the controls several times to "rotate" them to their position.  I have also edited the .wxs file to achieve the correct order.

I must be missing something obvious...  Or there needs to be a feature request...

*edit*

I guess this bug report (#5358) is related
« Last Edit: May 09, 2007, 08:44:37 pm by klight »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: [wxSmith]: Re-order existing controls
« Reply #1 on: May 23, 2007, 05:26:23 pm »
Culd you try it now ? I've added a feature that increases sizers so that you could drop items there.

I know that there are some situations where it's hart to reorder items, I'll have to think about them and probably add some modifier key. Adding drag&drop feature may currently need some extra code. I also planned to replace wxTreeCtrl with custom implementation, because wxTreeCtrl is not as flexible as it should for a good resource browser. So hope that drag&drop inside editor will be enough.

Sorry for inconvenience and for some delay before replaying to this post (I must have missed it ealier ;) ).

Regards
  BYO

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: [wxSmith]: Re-order existing controls
« Reply #2 on: May 23, 2007, 09:46:16 pm »
Pls don't replace wxTreeCtrl. Add a custom one. Woud be grate to have an ability to reorder components in palette  :wink:.
gcc+winXP+suse.

Offline klight

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: [wxSmith]: Re-order existing controls
« Reply #3 on: May 30, 2007, 04:28:01 pm »
BYO, your solution is brilliant!  :idea:

The half shading works very well and provides a predictable indication of where the dropped item will wind up.

Thank you!