View Single Post
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 23rd, 2014, 05:48 PM
In case it helps this is my position script and the style.

Code:
      ~set up our height based on our tallest portal
      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 vertically
      perform portal[name].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,-8]
      

      ~position the name on the left and let it use all available space
      portal[name].left = 0
      
      var edge as number
      if (tagis[User.UserSelect] = 0) then
        portal[select].visible = 0
        edge = portal[name].right
        
      else
        perform portal[select].alignrel[ltor,name,15]
        edge = portal[select].right
        endif
        
     if (tagis[User.NeedDomain] = 0) then
       portal[lbldomain].visible = 0
       portal[domain].visible = 0
       
     else
       portal[lbldomain].left = edge + 15
       perform portal[domain].alignrel[ltor,lbldomain,5]
       portal[domain].width = minimum(150,portal[info].left - portal[domain].left - 10)
       endif
       ~position the trait rank
      perform portal[rank].alignrel[ltor,name,8]
      portal[name].width = minimum(portal[name].width,portal[info].left - 5)

      ~if the ability is auto-added, change its font to indicate that fact
      if (candelete = 0) then
        perform portal[name].setstyle[lblAuto]
        endif
Code:
   <style
    id="incrTrait">
    <style_incrementer
      textcolorid="clrnormal"
      font="fntincrsim"
      textleft="13" texttop="0" textwidth="84" textheight="20"
      fullwidth="110" fullheight="20"
      plusup="incplusup" plusdown="incplusdn" plusoff="incplusof"
      plusx="99" plusy="0"
      minusup="incminusup" minusdown="incminusdn" minusoff="incminusof"
      minusx="0" minusy="0">
      </style_incrementer>
    </style>
AndrewD2 is offline   #10 Reply With Quote