Hey all,
I can't figure out why margins are not working between the buttons in the panel I've created. They only work around the outside. Is margins the correct property to be tweaking?
Ideally, I'd like between 1-2px but it looks like it is stuck at 10px. Any pointers in the right direction would be much appreciated I'd played around with the bounds property instead of size but that didn't work either.
Here is a simplified version of the script:
//begin script function myScript(thisObj) { var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Test", undefined, { resizeable: true, orientation: 'column', }); myPanel.spacing = 1; myPanel.margins = 2; var btnSize = [30, 30]; var btnGrp = myPanel.add('group', undefined); btnGrp.orientation = 'row'; var btn1 = btnGrp.add('button', undefined, '01'); btn1.size = btnSize; var btn2 = btnGrp.add('button', undefined, '02'); btn2.size = btnSize; var btn3 = btnGrp.add('button', undefined, '03'); btn3.size = btnSize; var btn4 = btnGrp.add('button', undefined, '04'); btn4.size = btnSize; myPanel.layout.layout(true); if (myPanel instanceof Window) { myPanel.show(); } else { myPanel.layout.layout(true); } myPanel.layout.resize(); myPanel.onResizing = myPanel.onResize = function() { this.layout.resize(); } } myScript(this); //end of script