Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: jberko 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.
-
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?
-
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.
-
I just uploaded the fix with "SetSashPosition()".
svn r5196