Hello,
I have a question regarding the Script UI
Does anyone know if it's possible make a button above an image with Script UI? Like using a background image, or something similar to absolute positioning in html?
Many thanks!
script ui question
-
c.buliarca
script ui question
You can use the 'stack' option like this:
Code: Select allfunction mainUI(){
var win = new Window( 'dialog', 'testUI' ,undefined,{resizeable:true,closeButton:true,borderless:false});
win.g0 = win.add('group');
win.g0.orientation = 'stack';
if(parseInt(app.version) > 11){// if is not cs4
win.img = win.g0.add('image', undefined, new File( Folder.desktop + "/grad.png"));
}
win.g1 = win.g0.add('group');
if(parseInt(app.version) <= 11){// if is cs4
g = win.g1.graphics;
var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.1, 0.1, 0.1, 0]);
g.backgroundColor = myBrush;
}
win.orientation = 'row';
win.bt1 = win. g1.add('button', undefined, 'ok');
win.bt2 = win.g1.add('button', undefined, 'cancel');
if(parseInt(app.version) <= 11){// if is cs4
win.img = win.g0.add('image', undefined, new File( Folder.desktop + "/grad.png"));
}
win.show();
}
mainUI();
Code: Select allfunction mainUI(){
var win = new Window( 'dialog', 'testUI' ,undefined,{resizeable:true,closeButton:true,borderless:false});
win.g0 = win.add('group');
win.g0.orientation = 'stack';
if(parseInt(app.version) > 11){// if is not cs4
win.img = win.g0.add('image', undefined, new File( Folder.desktop + "/grad.png"));
}
win.g1 = win.g0.add('group');
if(parseInt(app.version) <= 11){// if is cs4
g = win.g1.graphics;
var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.1, 0.1, 0.1, 0]);
g.backgroundColor = myBrush;
}
win.orientation = 'row';
win.bt1 = win. g1.add('button', undefined, 'ok');
win.bt2 = win.g1.add('button', undefined, 'cancel');
if(parseInt(app.version) <= 11){// if is cs4
win.img = win.g0.add('image', undefined, new File( Folder.desktop + "/grad.png"));
}
win.show();
}
mainUI();
-
tyr
script ui question
Actually, I have another similar question, is there a way to use html in scriptUI dialogue window in the same fashion the scriptUI can use flashplayer?
-
c.buliarca
script ui question
I don't see anything about integrating html into the ScriptUI in the docs.....It would have been a nice feature