Senior Member
Join Date: May 2013
Posts: 1,458
|
I'm having an issue with a character sheet layout. It's based on a table pick, but then I add extra text to it through a script, and this is confusing me in regards to how I can manage the height.
The concept I'm going for is that each character can pick from a list of schools of the art (supernatural predilections), and they can then pick certain disciplines associated with those schools. For instance, I can pick the "Kinetic" school and the "Protective" school, then I can pick the "Hidden Hand" and "Skeleton Key" disciplines which are associated with the "Kinetic" school, and the "Line of Defense" discipline which is associated with the "Protective" school. I want this to show up on the character sheet as such: Code:
Kinetic » Hidden Hand » Skeleton Key Protective » Line of Defense height = portal[name].height +10 ...then each School will have the height of the first element, in this case "Kinetic", regardless of how many disciplines have been added. In this case, that means that "Protective" would have too much white space. If I reversed it, and gave one discipline to "Kinetic" and two to "Protective", then the second discipline in "Protective" would be cut off. I'm pasting my template code below, and I'm attaching a PDF that shows how things get cut off. If anyone has any ideas, I'd appreciate the feedback. Thanks. Code:
<template id="oSchPick" name="Output The Art Table" compset="School" marginvert="10"> <portal id="name" style="outNormLt"> <output_label> <labeltext><![CDATA[ var schname as string var discipname as string var linkname as string var disciplvl as string var disciproll as number schname = field[name].text @text = schname foreach pick in hero from Discipline where "component.Discipline & !Hide.Discipline" discipname = eachpick.field[name].text disciplvl = eachpick.field[disLvlInit].text disciproll = eachpick.field[disRoll].value linkname = eachpick.linkage[dissch].field[name].text if (compare(schname,linkname) = 0) then @text &= "{br} » " & discipname & " " & disciplvl & " " & disciproll endif nexteach ]]></labeltext> </output_label> </portal> <!-- Portals used as the header --> <portal id="thearthdr" style="outTitle" isheader="yes"> <output_label text="The Art"> </output_label> </portal> <position><![CDATA[ var thirdwidth as number ~our height is driven by the tallest portal (they're all the same) height = portal[name].height +10 ~Calculate 1/3 of available width to account for three portals, ~ each with it's own column, with a padding of 6 between each. thirdwidth = (width-12)/3 thirdwidth = round(thirdwidth,0,0) doneif (issizing <> 0) ~setup appropriate widths for the various value portals portal[name].width = thirdwidth ~center everything vertically within the template perform portal[name].centervert ~perform portal[name].alignedge[left,0] ]]></position> <header><![CDATA[ ~our header height is the title plus a gap plus the header text ~height = portal[thearthdr].height ~width = (width-12)/3 doneif (issizing <> 0) ~our title spans the full width of the name portal portal[thearthdr].width = portal[name].width ]]></header> </template> Last edited by EightBitz; October 19th, 2017 at 03:36 PM. Reason: Fixed indents. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
On the portal this template is being displayed from, add varyheight="yes".
Last edited by Mathias; October 19th, 2017 at 04:15 PM. |
#2 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Is there anything similar with a dynamic_table?
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
That is only an option on the printout. Same-height tables is an annoying limitation of some of the standard windows methods that HL calls to build its tables, so in the UI, they all have to be the height set by the first one.
|
#5 |
|
|