<template
id="MenuSlPick"
name="Configurable Pick"
compset="UserSelect"
marginhorz="5"
marginvert="3">
<portal
id="name"
style="lblLeft"
showinvalid="yes">
<label
ismultiline="yes"
field="usrConfNm">
</label>
</portal>
<portal
id="thinglist"
style="menuSmall">
<menu_things
field="usrChosen1"
component="none"
candidatefield="usrCandid1"
usepicksfield="usrSource1"
maxvisible="10"
sortset="explicit">
</menu_things>
</portal>
<portal
id="thinglist2"
style="menuSmall">
<menu_things
field="usrChosen2"
component="none"
candidatefield="usrCandid2"
usepicksfield="usrSource2"
maxvisible="10"
sortset="explicit">
</menu_things>
</portal>
<portal
id="info"
style="actInfo">
<action
action="info">
</action>
<mouseinfo/>
</portal>
<position><![CDATA[
~set up our height; our width is pre-initialized for us
height = portal[info].height
~if this is a "sizing" calculation, we're done
doneif (issizing <> 0)
~position our tallest portal at the top
portal[info].top = 0
~center the other portals on the tallest one
perform portal[name].centeron[vert,info]
perform portal[thinglist].centervert
perform portal[thinglist2].centervert
~position the info portal on the far right
perform portal[info].alignedge[right,0]
~show our thing list menu if we have a tag expression - otherwise, show
~text only.
if (tagexpr[(component.Attribute & !Helper.ChosenOpt)] <> 0) then
portal[thinglist].visible = 0
portal[thinglist2].visible = 0
else
portal[thinglist].visible = !field[usrCandid1].isempty
portal[thinglist2].visible = !field[usrCandid2].isempty
endif
~if both thing lists are showing, space them appropriately
var total as number
if (portal[thinglist].visible + portal[thinglist2].visible = 2) then
total = width - portal[thinglist].left - 5
portal[thinglist].width = total / 2
portal[thinglist2].width = portal[thinglist].width
portal[thinglist2].left = portal[thinglist].right + 5
endif
]]></position>
</template>