2010-07-28 04:53 PM
2010-07-28 07:56 PM
2010-07-29 10:34 PM
max_len = max ( w_roona * name, … w_roovol * volume)That determines the width of the text box rectangle, using the longest of 10 options (for the various information that could be displayed in the text boxes). The one you are interested in is:
w_roonuat line 228, which gives the length of the zone number text (with a bit extra for the width of the rectangle).
if numRow > 1 then rect2 0,-tBlockHeight[1],widthStamp,-vlenYou can modify this code to change the widthStamp (which is the maximum of all text options) to w_roonu which is the <zone number> text length (I think you are using the Zone Number for the Room Number in your illustration, the Room Number is another option in this zone object). So this code:
if numRow > 1 then rect2 widthStamp/2-w_roonu/2,-tBlockHeight[1],widthStamp/2+w_roonu/2,-vlenshould draw the rectangle to fit the Zone Number. (It is a bit convoluted since the rectangle is normally drawn starting at the left edge of the Zone Stamp, but the zone number is shorter than the Zone Name, so I have used 1/2 of widthStamp to get to the center, then added and subtracted 1/2 of w_roonu to draw the rectangle.)