PDA

View Full Version : How to Resize a Window



Nickademus
March 11th, 2017, 04:03
What all contributes to a window being able to be resized?

I would imagine it would be the following code in the windowclass:

<sizelimits>
<dynamic />
</sizelimits>

But that alone doesn't seem to be enough. A graphic to show the ability to resize is nice, though I doubt it is needed.

There must be something else, as I can copy the code of a window in a ruleset that properly resizes, put it in a new windowclass and the window stops properly resizing.

damned
March 11th, 2017, 05:11
Try...

<sizelimits>
<minimum width="515" height="610" />
<maximum width="515" />
<dynamic />
</sizelimits>

Nickademus
March 11th, 2017, 10:38
Didn't change anything.
Besides, that format isn't used anywhere in the 5e ruleset that I've seen (haven't looked through the others).

The usual format is:

<sizelimits>
<minimum height="#" width="#" />
<dynamic />
</sizelimits>

But it doesn't matter, as I can copy/paste a windowclass directly from the ruleset and it suddenly stops resizing. I thought it might be a script that wasn't attached, but I don't see any in the original.

Trenloe
March 11th, 2017, 14:17
But it doesn't matter, as I can copy/paste a windowclass directly from the ruleset and it suddenly stops resizing. I thought it might be a script that wasn't attached, but I don't see any in the original.
Is it an issue with the resize handles? Can you resize using CTRL+left mouse button+Drag?

Nickademus
March 11th, 2017, 18:35
Good question. I tried it and Ctrl+mouse does indeed resize the window. So somehow I lost the side handles' functionality.

Trenloe
March 12th, 2017, 22:04
Where the frame definitions. https://www.fantasygrounds.com/refdoc/framedef.xcp Especially if there is any <insideoffset> setting.

Nickademus
March 13th, 2017, 14:16
Do you mean where is the frame definition? It's in the ruleset. I'm using the class/level popup as an example so the definition is:

<framedef name="charsheethelper">
<bitmap file="graphics/frames/charsheet.png" />
<offset>50,50,45,45</offset>
<insideoffset>0,5,12,14</insideoffset>
</framedef>

It has an insideoffset. I'm not sure why that would change it from resizing when created from the character sheet to not resizing when created from a different button.

The class making the frame has the following:

<windowclass name="charsheet_classes">
<frame>charsheethelper</frame>
<placement>
<size width="470" height="300" />
</placement>
<sizelimits>
<minimum width="470" height="300" />
<dynamic />
</sizelimits>

The <dynamic /> and <minimum.../> are there. All I do is change the name and call it from a button outside the character sheet. Though, this happens when I call my popup as well.