PDA

View Full Version : Resize Problems



dulux-oz
November 22nd, 2012, 07:56
Hi All,

Got a funny one - I can't seem to resize ANY of my windows inside my custom ruleset for FG. I've set the dynamic tag (in fact, I copied the chat window definition from the DnD3.5E Ruleset and the problem persists) and have scoured the board, but I'll be the son of a troll if I can work out what's going on.

If anyone's got any ideas I'd love to hear it (unfortunately, the I feel my ruleset is to big to post for people to look through) - suggestions on what to look for/check out would be greately apreciated.

Thanks in Advance

Dulux-Oz

Zeus
November 22nd, 2012, 08:33
As per the Ruleset reference make sure your windowclasses have the following tags:

<placement >
<size > Defines a default size for a top level window. If not specified, it will be calculated based on the controls.
<width > ... </width> The desired width, in pixels
<height > ... </height> The desired height, in pixels
</size>
</placement>
<sizelimits >
<maximum > Defines the maximum dimensions of the created window
<width > ... </width> The maximum width, in pixels
<height > ... </height> The maximum height, in pixels
</maximum>
<minimum > Defines the minimum dimensions of the created window
<width > ... </width> The minimum width, in pixels
<height > ... </height> The minimum height, in pixels
</minimum>
<dynamic > If present, allows the window to be resized
<hostcontrol /> Only allow the host to resize the window, cause the client windows to resize as a result of a resize on the host
<resize > ... </resize> Limit the manual resizing of the window to a direction. Valid options are "vertical", "horizontal" or "both".
</dynamic>
</sizelimits>

Key things to remember, set the intial size (and position) of the window, define whether the window is resizable (by host or by host & clients).

That should be all that you need.

dulux-oz
November 22nd, 2012, 09:00
Hi Dr.Zeus,

Thanks for your reply - unfortunately, I've already done all that - as I said, it's a funny one.

Anything else you'd think it might be?

phantomwhale
November 22nd, 2012, 09:15
Any chance of posting up the code of one of the windowclasses that won't resize ?

dulux-oz
November 22nd, 2012, 09:23
<windowclass name="wcNoteList">
<frame>frmScrollBoxForTabs</frame>
<placement>
<size>
<width>275</width>
<height>350</height>
</size>
</placement>
<sizelimits>
<dynamic />
<minimum>
<width>200</width>
<height>300</height>
</minimum>
</sizelimits>
<softclose />
<nodelete />
<sheetdata>
<tbcbcCloseScrollbox />
</sheetdata>
</windowclass>

<framedef name="frmScrollBoxForTabs">
<bitmap file="CommonFiles/Images/imgScrollBox.png" />
<topleft rect="0,0,115,110" />
<top rect="115,0,355,110" />
<topright rect="470,0,85,110" />
<left rect="0,110,85,400" />
<middle rect="85,110,385,400" />
<right rect="470,110,85,400" />
<bottomleft rect="0,533,85,37" />
<bottom rect="85,533,385,37" />
<bottomright rect="470,533,85,37" />
<insideoffset>0,0,10,8</insideoffset>
</framedef>

damned
November 22nd, 2012, 13:45
long shot from a non coder...

what are the first 2 lines from base.xml?


<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.9" release="3" logo="logo.png">

Zeus
November 22nd, 2012, 18:43
@dulux-oz - I can't see the <resize > ... </resize> tag inside <dynamic> in your code example. Try adding it with the keyword both.

dulux-oz
November 23rd, 2012, 03:17
To damned -> Yes, I've got those two lines further up the file - what I loaded was ony an extract.

To DrZeuss -> The <dynamic /> tag defaults to a resize of "both" when in the form I've just given. However, in the interest of thorougher trouble-shooting I re-coded the simple windowclass as you suggested - result: still not resizing.

NEXT! :-)

(Thanks for your input guys)

damned
November 23rd, 2012, 03:21
what do you have in those lines in your file?
from my very superficial understanding is that the values in here will reflect what features are avaiable to your ruleset... eg if you had version="2.2" and that didnt support resizing windows then you can resize windows.

dulux-oz
November 23rd, 2012, 03:40
OK, well I feel sheepish.

The line <?xml version="1.0" encoding="iso-8859-1"?> is a standard xml header - has nothing to do with FG per say, but needs to be there to tell ANY prog that what follows is XML.

However, for the line <root version="2.9" release="3" logo="logo.png">, I must have read the FG definitions incorrectly - I thought that was for MY ruleset, and as I'm working in version 0.1 of MY ruleset, it was set to 'version="0.1"' - "Doh!"

I've since gone back and changed it to reflect the FG version number - and hey presto - it works!

Thanks - that's probably going to clear up a few more problems that haven't raised their ugly heads yet - and I'm going to have to make sure I read the doco more carefully.

damned
November 23rd, 2012, 03:44
:)
woohoo - Dakadin - that ones for you!
i believe this field is for YOUR version: release="0.1"

Moon Wizard
November 23rd, 2012, 04:33
The version number is more of a compatibility flag specifying which version of FG that the ruleset was built for.

Cheers,
JPG

Dakadin
November 23rd, 2012, 04:40
:)
woohoo - Dakadin - that ones for you!
i believe this field is for YOUR version: release="0.1"

LOL Thanks! :D

Trenloe
November 23rd, 2012, 05:56
See info here: https://www.fantasygrounds.com/refdoc/