Posted by member 37809 on 2003-09-03 07:33:12 link
yup Dev :d
If the ends look weird with percentual widths, then have the ends fixed-width. You could do just those with If-thens. Then you have $ResolutionX-(widthOfEverythingButTheLabels)$ leftover. Because of the roundoff errors with using percents, you should leave one of the labels to have a width as a function of the space for all labels ($resolutionx-allends$) minus the percentual widths of the rest of the labels. Go left to right to make it easier.
leftEndw 50
rightEndw 50
leftEndx 0
rightEndx $ResolutionX-rightEndw$
dotWidth 10
; two ends, three dots
labelSpace $ResolutionX-leftEndw-rightEndw-3*dotWidth$
labelAx $leftEndW$
labelAw $0.1*labelSpace$
dot1x $labelAx+labelAw$
labelBx $dot1x+dotWidth$
labelBw $0.2*labelSpace$
dot2x $labelBx+labelBw$
labelCx $dot2x+dotWidth$
labelCw $0.1*labelSpace$
dot3x $labelCx+labelCw$
labelDx $dot3x+dotWidth$
labelDw $labelSpace-(labelAw+labelBw+labelCw)$
untested, but looks like you can do something similar?
If the ends look weird with percentual widths, then have the ends fixed-width. You could do just those with If-thens. Then you have $ResolutionX-(widthOfEverythingButTheLabels)$ leftover. Because of the roundoff errors with using percents, you should leave one of the labels to have a width as a function of the space for all labels ($resolutionx-allends$) minus the percentual widths of the rest of the labels. Go left to right to make it easier.
leftEndw 50
rightEndw 50
leftEndx 0
rightEndx $ResolutionX-rightEndw$
dotWidth 10
; two ends, three dots
labelSpace $ResolutionX-leftEndw-rightEndw-3*dotWidth$
labelAx $leftEndW$
labelAw $0.1*labelSpace$
dot1x $labelAx+labelAw$
labelBx $dot1x+dotWidth$
labelBw $0.2*labelSpace$
dot2x $labelBx+labelBw$
labelCx $dot2x+dotWidth$
labelCw $0.1*labelSpace$
dot3x $labelCx+labelCw$
labelDx $dot3x+dotWidth$
labelDw $labelSpace-(labelAw+labelBw+labelCw)$
untested, but looks like you can do something similar?