SetLayout() giving static values

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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:

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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:

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

Re: SetLayout() giving static values

Post by admin »

Hmm, okay. :wink:

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

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

Re: SetLayout() giving static values

Post by admin »

Dragging the splitter? :mrgreen:

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
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: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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:

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

Re: SetLayout() giving static values

Post by admin »

What is that script doing?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
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