Page 1 of 2
SetLayout() giving static values
Posted: 04 Feb 2019 12:56
by PeterH
In the last time there were some changes regarding XY's reaction on screen changes. But my problem still exists:
I use SetLayout() to get info, especially for Pane1Width and Pane2Width. Basically it works well.
But: if I change the width of XY's screen, be it by draging the right edge to the left or right, or by moving XY to another -bigger- screen to fullscreen mode,
so that the width of pane2 changes, the value of especially Pane2Width doesn't change at all!
I think/hope this can be called a
Oh - just found some more info: if I drag the splitter right or left, the values of Pane1/2Width
do change.
And: if I first change the width of XY, and then once drag the splitter, both pane widths change to the
corrected sizes
Re: SetLayout() giving static values
Posted: 05 Feb 2019 16:08
by admin
Well, these are internally used values that get updated when needed. I'm not sure why I exposed them. I think I should remove them from this command.
Re: SetLayout() giving static values
Posted: 05 Feb 2019 21:12
by PeterH
Hm - I had expected that this command serves to expose the values it returns.
But OK: I need these values to "swap" (i.e.exchange) the sizes - be it horizontal or vertical - between pane1 and pane2. (So in the moment I read and then set them by SetLayout() ). Is there any other chance to do so? (With real/updated values, of course.)
Re: SetLayout() giving static values
Posted: 06 Feb 2019 21:03
by admin
Not at the moment, sorry. When I find the time I will remove these values from SetLayout. They don't belong there.
Well, that said, I tried something anyway. No mention in change log. Next beta... (v19.60.0008)
Re: SetLayout() giving static values
Posted: 07 Feb 2019 00:01
by PeterH
Hey - at least for the situations I need & have tested it works now!
...but only, if you will not delete it
Re: SetLayout() giving static values
Posted: 07 Feb 2019 08:29
by admin
Hmm, okay.
Re: SetLayout() giving static values
Posted: 07 Feb 2019 11:13
by PeterH
Thanks a lot!
By the way: still no idea how to get, (modify and then) set width and/or hight of panes by other means...
Re: SetLayout() giving static values
Posted: 07 Feb 2019 11:15
by admin
Dragging the splitter?
Re: SetLayout() giving static values
Posted: 07 Feb 2019 11:40
by PeterH
OK: that would be "manual automation"
Something like Chaplin's "modern times". (I think that was the name, wasn't it?)
Re: SetLayout() giving static values
Posted: 18 Feb 2019 11:46
by admin
I saw it coming... had to remove this "fix". These values are not usable for the user. I will remove them from SetLayout().
Re: SetLayout() giving static values
Posted: 18 Feb 2019 11:51
by bdeshi
WWait wait wait!
remove them from the returned layout string, okay, but please let them be definable with setlayout('Pane#Height/Width');
Re: SetLayout() giving static values
Posted: 18 Feb 2019 12:08
by admin
I should have said: I
should remove them from SetLayout().
I won't do anything now. It's an expert function anyway, so this might as well be solvable in the docs...
Re: SetLayout() giving static values
Posted: 18 Feb 2019 12:10
by PeterH
Will that mean there will be no way to get (and maybe also to set) these values?
While it wouldn't help much to set them, if I can't get them.
It would affect scripts! At least mine...
(I've used the partly wrong values for several years now...)
OK: if there would be any other solution to get and set pane widths and heights
Re: SetLayout() giving static values
Posted: 18 Feb 2019 12:13
by admin
What is that script doing?
Re: SetLayout() giving static values
Posted: 18 Feb 2019 12:16
by bdeshi
ok, if I understood Don's comment right, he's just going to revert the "fix", so setlayout() might return out-of-date values, but you can still set the height/widths with it.
As for getting the values, use controlposition():
Code: Select all
gettoken(controlposition('L 1'), 4, '|'); // pane 1 height
gettoken(controlposition('L 2'), 3, '|'); // pane 2 width