.bounds newline Script UI
I've created an array of buttons.
var b = new Array(); for(var i = 0; i < dataField.length ; i++ ){ if(dataField[i][1].indexOf("DA ") > -1){ b[i] = groupOne.add ('iconbutton', undefined, undefined, {name:'Blue', style: 'toolbutton'}); b[i].bounds = [0,0,30,20]; b[i].fillBrush = b[i].graphics.newBrush(b[i].graphics.BrushType.SOLID_COLOR,dataField[i][0]); b[i].onDraw = customDraw; function customDraw() { with( this ) { graphics.drawOSControl(); graphics.rectPath(0,0,size[0],size[1]); graphics.fillPath(fillBrush); if( text ) graphics.drawString(text,textPen,(size[0]-graphics.measureString (text,graphics.font,size[0])[0])/2,3,graphics.font); }} } }
This all works fine.
However. What I want is, when I resize my panel. The buttons to go onto a newline. I know a way to create lines of so many, but it would be nice to have something that automatically creates new lines.
