Thread: Gizmo confusion
View Single Post
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old April 9th, 2013, 06:28 PM
Thanks, that was it. I had the wrong component set.

Now, how can I get the title to show? Every time I try Titlebar or HeaderTitle, I get an error.

Form_gadget.dat
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<document signature="Hero Lab Data">

  <portal
    id="prtGadget"
    style="tblInvis">
    <table_dynamic
      component="Ability"
      showtemplate="tmpShowGad"
      choosetemplate="tmpPickGad"
      scrollable="yes"
      alwaysupdate="yes"
      candidatepick="GadgetHelp"
      candidatefield="GadgetExpr"
      addpick="GadgetHelp">
      <additem><![CDATA[
        @text = "Add Trait"
        ]]>
        </additem>
      </table_dynamic>      
    </portal>

  <template
    id="tmpPickGad"
    name="Gadget Pick"
    compset="Ability"
    marginhorz="3"
    marginvert="1">

    <portal
      id="name"
      style="lblSmall">
      <label>
        <labeltext><![CDATA[
          @text = field[name].text
          ]]></labeltext>
        </label>
      </portal>
      
    <position><![CDATA[
    
      ~set up our height based on our tallest portal
      height = portal[name].height

      ~if this is a "sizing" calculation, we're done
      doneif (issizing <> 0)

      ~position our tallest portal at the top
      portal[name].top = 0
      
      ~position the name on the left and let it use all available space
      portal[name].width = width
        
      ]]></position>
    </template>
    
  <template
    id="tmpShowGad"
    name="Gadget Show"
    compset="Ability"
    marginhorz="3"
    marginvert="1">

    <portal
      id="name"
      style="lblSmall">
      <label>
        <labeltext><![CDATA[
          @text = field[name].text
          ]]></labeltext>
        </label>
      </portal>
      
	<portal
	  id="domain"
	  style="editNormal">
	  <edit
	    field="domDomain">
	    </edit>
	  </portal>
          
    <portal
      id="info"
      style="actInfo">
      <action
        action="info">
        </action>
      <mouseinfo/>
      </portal>
      
    <portal
      id="delete"
      style="actDelete"
      tiptext="Click to delete this item">
      <action
        action="delete">
        </action>
      </portal>

    <position><![CDATA[
    
      ~set up our height based on our tallest portal
      height = portal[name].height

      ~if this is a "sizing" calculation, we're done
      doneif (issizing <> 0)

      ~position our tallest portal at the top
      portal[name].top = 0
      portal[name].left = 0
      
      ~center the other portals vertically
      perform portal[domain].centervert
      perform portal[info].centervert
      perform portal[delete].centervert

      ~position the delete portal on the far right
      perform portal[delete].alignedge[right,0]
      
      ~position the info portal to the left of the delete button
      perform portal[info].alignrel[rtol,delete,-5]
      
      ~if we don't need a domain, hide the portals
	  if (tagis[User.NeedDomain] = 0) then
	    portal[domain].visible = 0
	    
	    ~position the name on the left and let it use all available space
        portal[name].left = 0
        portal[name].width = minimum(portal[name].width,portal[info].left - 5)
        
      else
        ~position the domain portal to the left of the delete
        perform portal[domain].alignrel[rtol,info,-5]
        
        var remWidth as number
        remWidth = portal[info].left - 5
        ~position the name on the left and let it use all available space
        portal[name].left = 0
        ~portal[name].width = maximum(portal[name].width,portal[domain].left - 5)
        portal[name].width = remWidth/2
        
        perform portal[domain].alignrel[ltor,name,5]
        portal[domain].width = remWidth/2
        
        ~portal[domain].width = minimum(150,portal[info].left - portal[domain].left - 5)
        
        
        endif
        
      ~if the ability is auto-added, change its font to indicate that fact
      if (candelete = 0) then
        perform portal[name].setstyle[lblAuto]
        endif
        
      ~shrink the name to fit the available space if it's too big, then re-center
      perform portal[name].sizetofit[6]
      perform portal[name].centervert
        
      ]]></position>
    </template>

  <layout
    id="layGadget"
    marginvert="4">
    <portalref portal="prtGadget" taborder="20"/>
    <position><![CDATA[

      ~position and size the table to span the full layout
      portal[prtGadget].left = 0
      portal[prtGadget].width = width
      
      ]]></position>
    </layout>

  <form
	id="frmGadget"
	name="Gadgets"
	marginhorz="10"
	marginvert="5">
	<layoutref layout="layGadget"/>
	<position><![CDATA[
	  layout[layGadget].width = 450
	  perform layout[layGadget].render
	  width = layout[layGadget].width
	  height = 200
	  ]]></position>
	</form>

  </document>
For HeaderTitle, I get this: Attempt to use a 'headertitle' script within a table with no valid 'headerthing' for portal '_headerui' and '???????' on the Header.

For TitleBar, I don't get anything....

Thoughts?
TC
TCArknight is offline   #20 Reply With Quote