Author Topic: wxSmith sash postion in splitter window doesn't work  (Read 5329 times)

Offline jberko

  • Single posting newcomer
  • *
  • Posts: 3
wxSmith sash postion in splitter window doesn't work
« on: August 27, 2008, 01:58:56 pm »
Setting the Sash Position property in wxSmith for a Splitter Window has no effect in the code.  The seemingly simple solution would be to utilize the third parameter in the SplitHorizontally / SplitVertically functions, but I have tried adding this to my code and it does not reliably work.  A better solution is to add a call to the SetSashPosition function.  Please help.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith sash postion in splitter window doesn't work
« Reply #1 on: August 27, 2008, 04:35:53 pm »
byo (the wxSmith developer) is unavailable at the moment and I don't need to work this week, so I had a look on your problem.

I can upload a fix with either "SetSashPosition()" or with using the third parameter of "Split[Horizontally|Vertically]".

Both works fine for me and seems to be reliable, at least in my very small test project.

I would prefer to use the second form.
But only because it's a little shorter.
I think it's a matter of taste, if both work without problems.

Can you explain what you mean exactly if you say it does not work reliable?

Offline jberko

  • Single posting newcomer
  • *
  • Posts: 3
Re: wxSmith sash postion in splitter window doesn't work
« Reply #2 on: August 27, 2008, 08:32:58 pm »
I let wxSmith generate the SplitVertically function with 2 panels as parameters, then edited my *Main.cpp file to add the third parameter to an acceptable value, saved, compiled, and ran, and saw no change in the sash position.  I have many components populating the left panel, and only a TextCtrl in the right panel. I suppose, since it worked for you, that there may be some other wxSmith property that I am not setting correctly, but I like the SetSashPosition function since I know it works regardless of other settings.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith sash postion in splitter window doesn't work
« Reply #3 on: August 27, 2008, 09:40:16 pm »
I just uploaded the fix with "SetSashPosition()".

svn r5196