PDA

View Full Version : Vertical squeeze



Tenian
July 22nd, 2008, 18:11
A picture of the issue can be seen in this post (https://dnd-4e.blogspot.com/2008/07/now-with.html)

I would like to remove the whitespace between the Property entries.

The property sheet has a minimum height of 20. The text of the property is stored in a stringfield with multilinespacing.

The main item sheet has windowlist of those property sheets.

I'm sure it's something simple, I'm just not seeing it.

Foen
July 22nd, 2008, 19:26
Windowlists don't resize very effectively - I think it is a design choice to spped up the list rendering (for example they silently refuse to generate onSizeChanged events for list members).

I am having the same problem with a list of formattedtextfield entries, and I don't think there is a way around it.

Stuart

Tenian
July 23rd, 2008, 02:26
That's unfortunate. It works great if the list is to be fixed length...it's just the variable length that seems to be an issue.

I went another route and just created a formattedtext string to put in place of the list (this also helped with a bunch of fields that don't apply to every magic item).

The real data is all still in the XML (and thus accessible within the ruleset) but all the variable sections of the display are one block of text.

You can see the results here (https://dnd-4e.blogspot.com/2008/07/phb-009820-mm-009812.html). You can compare them to my earlier post.

Foen
July 23rd, 2008, 05:58
Neat answer, but unfortunately I can't apply the same technique. Formatted text fields seem to have a maximum size limit which isn't normally a constraint (it is hundreds of lines long), but mine is a very long list and I hit the problem when I got to 'C' in the alphabet.

Cheers

Stuart

Tenian
July 23rd, 2008, 10:53
JPG's 4E module some how vertical squeezes variable length fields (formattedtext fields I believe). Look at the other image (https://bp1.blogger.com/_uDFpksWt8LQ/SIZ-HysSwHI/AAAAAAAAAiE/hFRBs9UNRpw/s1600-h/mm_00_98_12.jpg) in my link. The power page of a direhelm has 3 entries all different sizes with a uniform gap between them.

Foen
July 23rd, 2008, 16:57
Hmm, maybe I need to try harder.

I don't think this problem always manifests itself, but it has certainly happened to me a couple of times.

I'll let you know if I uncover something.

Stuart

Foen
July 24th, 2008, 06:53
Given this some more effort, and I have been able to fix the problem I was having so it might help you too, Tenian.

My list (spelllist) has a specific windowclass (spelllistitem) which is intended to resize as the contents grow/shrink. The spelllistitem has a variable length formatted text field, anchored on three sides. That way, spells with long descriptions should render with bigger text boxes and bigger windows.

When I first defined it, the list would resize bigger for lengthy spells, but failed to shrink for terse spells (the formatted text box shrank, but the spelllistitem windowclass got stuck at a minimum size), giving gaps between the spells on the list.

I tracked the problem down to the <sizelimits> tag in spelllistitem, which I had previously set to:


<sizelimits>
<dynamic/>
</sizelimits>

But it now works properly when the tag is redefined as:


<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>


Hope that helps

Stuart

Tenian
August 5th, 2008, 23:49
I finally got around to this. I was cleaning up the input section of magic items and noticed the properties needed the squeeze.

I had the sizelimit on the sheet but in the wrong place. For some reason it was inside the <sheetdata>..</sheetdata> instead of outside it. I changed it to look like this:

<windowclass name ="item_propertylistitem">
<sizelimits>
<minimum>
<height>15</height>
</minimum>
</sizelimits>
<sheetdata>
<columnstringfield name="shortdescription">
<anchored>top</anchored>
</columnstringfield>
<columnfieldlabel>
<anchor>shortdescription</anchor>
<static>Property</static>
</columnfieldlabel>
<!-- Spacer -->
<genericcontrol>
<anchored>
<to>shortdescription</to>
<position>below</position>
<size>
<height>5</height>
</size>
</anchored>
</genericcontrol>
</sheetdata>
</windowclass>


And all is well. Thanks for not giving up even though I did :)

Xorn
August 6th, 2008, 00:30
I like to pretend I could get my head around this stuff. It's awesome watching you guys figure stuff out, though.