Png files as buttons in Script UI

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

Hi everyone,

I'm looking for a way to use a png file as a button in Script UI. I know how to display a png file, i know how to create a button, but i can't seem to make both work together.

Plus i'd relly like the button to not have a "button" look (no grey embossed rectangle). My goal is to create a small toolbar that looks like to tools toolbar or the preview toolbar in AE.

If with rollover, you'd make me the most happy man in the world for a few hours !

Thanks for the help !
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Hey Seb,

Check out Jeff A's script launcher script. I believe he uses png's as buttons.

-Lloyd
Steven F.
Posts: 6
Joined: February 19th, 2009, 3:11 pm

try using iconbutton, here is some code created with Rapid ScriptUI applicatiion

Code: Select all

var rapidDlg = new Window('dialog',"<Replace Me>",undefined);
buildWindow();
rapidDlg.show();

function buildWindow(){


// Properties for rapidDlg.IconButton1
//change location for your png
	rapidDlg.IconButton1 = rapidDlg.add('iconbutton',undefined,"C:\\Documents and Settings\\user\\Desktop\\PHPMailer-FE_v4.0.2\\sample_form\\_lib\\_src\\ok.png", {style:'toolbutton'});

}
check out our scriptUI forums at http://forums.scriptui.com
Steven
http://scriptui.com
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

Thanks Lloyd & Steven.

I'll try this as soon as i've got some time to go back on my script :)

BTW, when will Rapid Script UI be released ?

(Steven, i've joined your script UI forum btw ;))
Steven F.
Posts: 6
Joined: February 19th, 2009, 3:11 pm

Rapid ScriptUI Has Been Release For A While Now. See Our Current Steal Of A Deal At http://www.scriptui.com/specialoffer.aspx
BTW post the question to the scriptUI forums and i'll show you how to do rollovers
Post Reply