SetLayout() giving static values

Things you’d like to miss in the future...
PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

SetLayout() giving static values

Post 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 :bug:

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 :shock:
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post 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.

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: SetLayout() giving static values

Post 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.)
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post 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)

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: SetLayout() giving static values

Post by PeterH »

Hey - at least for the situations I need & have tested it works now! :tup: :appl:

...but only, if you will not delete it :naughty:
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post by admin »

Hmm, okay. :wink:

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: SetLayout() giving static values

Post by PeterH »

:biggrin: Thanks a lot! :cup: :om:

By the way: still no idea how to get, (modify and then) set width and/or hight of panes by other means...
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post by admin »

Dragging the splitter? :mrgreen:

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: SetLayout() giving static values

Post by PeterH »

OK: that would be "manual automation" :lol:

Something like Chaplin's "modern times". (I think that was the name, wasn't it?)
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post 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().

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: SetLayout() giving static values

Post by bdeshi »

WWait wait wait!
remove them from the returned layout string, okay, but please let them be definable with setlayout('Pane#Height/Width');
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post 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...

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: SetLayout() giving static values

Post 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 :whistle:
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SetLayout() giving static values

Post by admin »

What is that script doing?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: SetLayout() giving static values

Post 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
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply