How to create an Image/Picture button

So I have a window of dialogue with 2 rows of panels. On each panel are a the standard buttons with the text, however, I want one of these buttons, had instead of text, display a picture instead. How would I go to do this?

Here are my Tester script, creating a window of simple dialog as described.

The button I want to have a picture is CP called one that calls the color wheel.

I'm a complete script newbie, please keep this in mind with your explanations and examples, thanks.

function hexToRGB(hex) {  
    var r = hex >> 16;  
    var g = hex >> 8 & 0xFF;  
    var b = hex & 0xFF;  
    return [r, g, b];  
    };  

var win = new Window("dialog", "Picture Tester");  
  
win.panel1 = win.add('panel', undefined);  
win.panel1.group = win.panel1.add('group', undefined );  
win.panel1.group.orientation='row';  
  
win.panel1.group.finalBtn = win.panel1.group.add('button',undefined, "Dummy", {name:'final'});  
win.panel1.group.binderBtn = win.panel1.group.add('button',undefined, "Dummy", {name:'binder'});
win.panel1.group.bocBtn = win.panel1.group.add('button',undefined, "Dummy", {name:'boc'});

win.panel2 = win.add('panel', undefined);  
win.panel2.group = win.panel2.add('group', undefined, );  
win.panel2.group.orientation='row';  
  
win.panel2.group.closeBtn = win.panel2.group.add('button',undefined, "Close", {name:'close'});
win.panel2.group.formatBtn = win.panel2.group.add('button',undefined, "Dummy", {name:'format'});
win.panel2.group.colourPickBtn = win.panel2.group.add('button',undefined, "CP", {name:'colourPick'});


//======================TEMP CLOSE BUTTON====================//
//win.panel2.group.closeBtn = win.panel2.group.add('button',undefined, "Close", {name:'close'});

win.location = [1850, 40];

win.panel2.group.colourPickBtn.onClick = function(){  
    var g = win.graphics;  
    var color_decimal = $.colorPicker();  
    if (color_decimal>=0){  
        var color_hexadecimal = color_decimal.toString(16);  
        var color_rgb = hexToRGB(parseInt(color_hexadecimal, 16));  
        var color_that_ae_add_solid_understands = [color_rgb[0] / 255, color_rgb[1] / 255, color_rgb[2] / 255];      
            
        g.backgroundColor = g.newBrush(g.BrushType.SOLID_COLOR, color_that_ae_add_solid_understands);  
        };  
    }    

//======================PALETTE WINDOW END===========================//


//======================FORMAT FUNCTION END===========================//

//===================TEMP CLOSE FUNCTION=====================//


win.panel2.group.closeBtn.onClick = function(){  
  win.close();
}

//===================TEMP CLOSE FUNCTION END=====================//


win.show ();

Use this...

https://INDD.Adobe.com/view/a0207571-ff5b-4bbf-A540-07079bd21d75

Tags: InDesign

Similar Questions

  • How to create subtitles for a button?

    Hello!

    I really tried to find the answer to this ridiculous problem on mine, but without result. Please help someone!

    The situation:

    I have a menu with three choices: 'Play Movie', 'scène Sélection' and 'subtitles '. Now, the text with these choices are part of the image background, created in the first (the program that I know best). They are written with an old typewriter to get that gritty feel.

    I want the user to navigate between these 'menus '. The currently selected item should be indicated by a black circle/point/point before the item text. By default, when the menu appears, there is a black circle in front (to the immediate left of) the element "Play Movie". The user should now be able to intervene with its remote control, the other points, thus making the circle black in front of 'Play movie' disappear and instead of other elements. In short: the black circle is always show before the currently selected item. OK, I got there a little chatty, but the idea got across hopefully. One more thing: the background color is white to 100%.

    So far, my solution was this: I placed Black circles (small images with graduation and everything, very nice looking) before all THE THREE ELEMENTS. Can I convert these into buttons. Then I choose the color defined for the menu so that the unselected state is 100% covering the Black circles that should not see white, pure and simple, with an opacity of 100%. Only in the opacity of selected and active States for the fall of subpicture for button at 0%, revealing the black circle that must be seen.

    The problem? Well well, on some DVD players (not on the XBOX 360 so), when an element is activated, all three circles show a brief moment until the selected action begins (the movie playing for example). It also happens in preview again. It's not logical at all and looks amateurish. I don't know why it happens, but my guess is that it would not be if I did it the 'proper' way: by creating a subpictures fo the buttons in the shape of circles. I understand that the gradations seeks beautiful must go out of the window, but it's a price I'm willing to pay.

    But now I encountered an unexpected problem: I do not understand how to create a subpicture for button who is a black circle. It seems the documentation in still and on the forums generally takes for granted that you know how to do this.

    What I tried was this: I created a monochrome, small image in format bmp - a black circle on a white background. But this picture just shows up as a black rectangle in yet.

    What should I do? I must add that I have no real experience with Photoshop, so go slowly if you go.

    Kind regards

    Nikolaj

    Basically, when we realize the limitations of the secondary image highlights, as defined by the DVD-plug., it is easy to see the "Workaround".

    A couple of aspects of subpicture highlights are:

    1.) 2-bit color (either ON or OFF), in a color scheme limited, with degrees of transparency (as opposed to the opacity of the PS).

    2.), they will appear on top of anything else on the Menu, including things like text/graphics buttons.

    By building your secondary image to highlight in PS, you can use the masking allows you to set where it will be, and where it will not. In the case that prompted my article, the poster had a series of text buttons and the secondary image highlights were formed from this text. The poster did not like the look of these 2 bits stepped colored blocks covering the text in the button. The solution is to "a hole" in the subpicture Highlight, so that it is hollow, there where the text of the button. This in the PS, using the "outline" of this text to create a mask to highlight of the secondary image. The appearance in staircase can be adjusted a little, using a degree of transparency (defined in the No - Auto Color Set back in again). We always have a color 2 bits subpicture Highlight and she still overlays of text for the button, but now there's a hole in it, just where the text of the button is located, and it is seen through this hole. The introduction of transparency has the Visual effect to "soften" the appearance of the color of 2 bits, even if the edges are still there - they look just softer. I went to show how we can even use a second secondary image point out, it's just a little bigger than the first and more transparent to simulate a "glow". Now, we can have a real "glow", because we are limited to this 2-bit color to highlight the secondary image, but we can simulate it.

    A large part of what makes a designer is really light hand - illusion. They all have to work within the limits of the specifications DVD (or BD)., but with a little creativity, planning and other work in PS, and yet, they can create enough smoke and enough mirrors allows to deceive the user into believing that what they think they see skirt the DVD specifications. They did not, but here comes the illusion.

    We receive many questions from people who would say that one commercial DVD, or another, a full-color subpicture highlights, and they complain that yet can do that - only 2 bits subpicture highlights. What they see, but don't realize, isn't fooled Menu, with a color chart and no real subpicture highlight visible. Jeff gives all the details on this operation. Even for those who have seen a button with a miniature of duo-tone, which transformed into color, when the button is navigated to. Wow, how did, and why Adobe Encore can do that? Well, what they saw was fooled Menu, with a full color sticker and not point out visible real subpicture.

    Jeff shows how to create what seems like at least a secondary image 3 colors to highlight. It's really just 3 regular 2-bit subimage color highlights, with masking to create the illusion that he has beaten the DVD specifications. Neat! [From the USA, I also liked that he used the American flag, but he could have chosen the "tricolor" French, or any other flag, without work.]

    Here are all the tips of righteous, but if the user buys in the illusion, which is?

    Enjoy,

    Hunt

    PS - if much larger positions, the elderly were lost, when the forum change that's happened, I strongly suggest to read the posts here. You can ignore those that don't offer anything, but almost every possible illusion was considered at least once, and probably a lot, with some of the different workflows offered by those who responded. Great reading.

  • How to create a list of button by using the names of a table

    Hi, I want to create an application that displays detailed information about something. for example, as the profile of the users. my application will read an xml response from the server that contains the list of the names of the users. How to create a list of buttons using the names and then each button that displays the name that can be pressed and displays detailed information about the name? I think that it is similar to the BBM app that displays a contact list of the user. Thank you very much

    Create a ButtonField as:

    ButtonField [] users_buttons = new ButtonField [number of users];

    Initialize the uasing dem:

    for (int i = 0; i)<>

    users_buttons [i] = new ButtonField ("user", Field.FIELD_HCENTER |) ButtonField.CONSUME_CLICK);

    Make dem clickable setchangeListener method of buttonField and Ooveride Navigation click to make a few operatoin by clicking on the specific button!

  • How to create an image of an arm sticking out a hole?

    Hi all;

    I was wondering how to create a realistic picture of an arm sticking out a hole? Or an eye peeking through a hole in photoshop?

    I have attached photos.

    Thank youarm.jpgeye.jpg

    Hi.You can use masks to create a composition of sucha. I made an example for you. Hope that it helps out you. Paint shadows to make it more realistic.

  • How to create an image of landscape of 3 photos

    How to create an image of landscape of 3 photos, i.e. put together them?

    Create a panoramic photo | Learn Photoshop CC | Adobe TV

    Create panorama | Learn Photoshop CC | Adobe TV

  • How to create an image button...

    Tools: Adobe Photoshop CS5

    Master level: very novice

    Goal: Creat Button for a website

    Environment: Windows Vista

    Problem: the following images are buttons was designd. An image is in the normal state, while the other button is in State rollver. I want to create an image of indetical with the same properties for example (size, font type, font size, background color of color police) called "intuitive healer". I don't know how to imitate the fonts and background colors.

    klass2b_b2.gifnormal status of a button

    klass2b_b2_over.gifbutton rollover

    Intuitive healer? normal

    Intuitive healer? Rollover

    I'm curious to know how to create a button with the exact "look and feel" design and writing on this healer Inutive

    Make my day

    the guy looks like both a new Roman font.  If you follow the tutorial below, it sets out nicely. you simply omit the gradient and effects that they do in the tutorial, to match the one you want on it. It will associate Dreamweaver and Photoshop.

    Flight path Imaging:

    http://help.Adobe.com/en_US/Photoshop/CS/using/WS18F9E180-3241-4891-ACC8-82C9DFB254F5a.htm l

    Watch this video:

    http://www.YouTube.com/watch?v=_pVfBtW-Tuq

    -good luck!

    Janelle

  • How to create the image button in apex oracle 3.1

    Hello

    I am new to oracle apex.

    I would like to show button called delete as an icon of image for the same thing that I saved the attributes of the button as shown below

    Button = Image Style

    Button Image #WORKSPACE_IMAGES #delete_row_64.gif

    But this isn't no image showing, as image not available.

    Please someone help me how to solve this issue

    Helpe me please where should I keep the images that I can use as an icon of the image to the page element.

    Thank you and best regards,
    Ibrahim Sayyed.

    You must download the image in for the shared components

    Gus

  • How to create an open/close button

    Hi all

    I'm trying to create a button in InDesign when it is typed an image opens, and when it is typed again the image closes, does anyone have ideas how to do this please?

    Kind regards

    Barb

    Create the hotspot buttons. See this article: Hot Spot button Workaround for InDesign dig Pubs

    If you want to create a simple toggle button, create a button that points to a MSO (multi-state object) in which the first State is empty and the second State is the image. When you create the button, use the 'go to the next State.

    To create more advanced buttons, download the free app from the DPS advice and look at advanced overlays > toggle button Hot Spot. Web viewer version is here: DPS tips Advanced overlays: toggle button Hot Spot

  • How to create an image of a Macbook Pro with El Capitan

    I want to create an image of a Macbook Pro with OS El Capitan and store it on an external. In short, it would be a disk image and I can use it for another like for like reimage.

    One option is Carbon Copy Cloner: https://bombich.com/

  • How to create the image that was stored on the HARD drive

    Hello

    When I fixed my windows, I chose "Restore Factory Setting" options.
    This happens to reformat my hard drive and I lose the "TOSHIBA HDD Recovery" image.

    Is it possible to create this image again?

    Thanks in advance for your help.

    Hello

    The use of the Toshiba HDD image would format the HARD drive, but should not remove the Toshiba HDD image files that are stored on the second partition!
    That's why I put t know why you said you lost the image of Toshiba HDD.
    That is a little strange.

    On the other hand, you can try to create the recovery disk using tool of preinstalled Toshiba Toshiba recovery disc Creator called.
    This tool helps you to create the recovery disk using Toshiba image files stored on the second partition.
    I think you should try this.

    See you soon

  • How to create an image system to the command prompt?

    I need to create an image of 'system' and I can't have accdess Wizard "backup and restore".

    Hi princesscontino,

    Thanks for the question.

    (1) what exactly happens when you try to access Wizard backup?

    (2) there was recent changes made to the computer before the show?

    (3) you have other programs of backup of other third-party backup programs?

    You can configure Windows backup to run any way you want and also to create a task in Task Scheduler to run the weekly wbadmin command to create the system image. For the sup of wbadmin commands, see http://technet.microsoft.com/en-us/library/cc754015 (WS.10) .aspx

    You must run wbadmin from an elevated command prompt. (To open a command prompt, click Start, right click Guest and then click Run as administrator.

    "Wbadmin" command line utility and the utility is available only in Windows Vista Business, Enterprise and Ultimate editions and not in the Home Basic or Home Premium editions.

    You can also check: http://windows.microsoft.com/en-US/windows-vista/Back-up-and-restore-frequently-asked-questions

    Please report if you are still having the problem. I will be happy to provide you with the additional options that you can use to get the problem resolved.

  • How to create an image

    I want to create an image, which will contain the BONES, but also a set of software and update windows, but that should be a model or the independent brand, is it possible?

    Hello

    Personally, I prefer the 3rd party programs to create a full backup of the computer.

    There are a number of 3rd party programs available for a full backup of the computer; others, you must pay for, some are free.

    This program must be purchased:

    "Acronis True Image".

    http://www.Acronis.com/homecomputing/products/TrueImage/index_gwo.html?utm_expid=4274314-6

    These are free programs for the protection of the computer:

    "EaseUS Todo Backup free"

    http://www.TODO-backup.com/products/home/free-backup-software.htm

    "AOMEI Backupper Standard for Win7.

    http://www.backup-utility.com/aomei-backupper-for-Windows7.html

    "Download Backup & Recovery 2012 free FREE!

    http://www.Paragon-Software.com/home/BR-free/download.html

    «Macrium Reflect FREE Edition»

    http://www.Macrium.com/reflectfree.aspx

    See you soon.

  • How to create an add files button in Muse CC?

    Hello world!

    I would like to know how I can create a button Add files in Muse CC. The purpose of the button will be for customers to use to download files that would like to send me. Maybe they have an image or a file that they would like for me to look at before starting their project with me, and I would like this feature on my site.

    If there is a widget on the market, please provide a link that I can take a look.

    Thanks in advance!

    Hello

    Please check similar topics here

    Download file button

    Download the document (pdf/word) by using Muse

    Create a download button in the site of Muse

    Let me know if you have any question.

  • How to create "text - image" flipping disjointed?

    I want to create rollover text color-changing and swap image when cursour lies on one of them.

    Text and picture is next to each other, but placed in different divs .

    For now, I created a CSS rollovers for each part separately, and of course, it would be a true desert if somewhere out there could be a script that simply can do trigger the two rolovers when cursour is located one of the elements,

    But knowing programming so far I'm sure closer adequacy of you to my hopes are 4 500 long script characters. (:

    So question is - how?

    Any help will be really appreciated...

    Message fonts fixed - to make it easier to read. [Forum Moderator]

    You can do it with the CSS tags and .


    List CSS Menu Rollover

    http://ALT-Web.com/demos/CSS-disjointed-menu-rollover.shtml


    Rotation of text (with your image alt text)

    http://ALT-Web.com/demos/CSS-disjointed-text-rollover.shtml

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    www.Alt-Web.blogspot.com

  • How to create a chain of buttons?

    Hi, I am new to the use of labview and I want to create a simple program such that when a user selects a button would appear another button.

    i.e. If the user selects LED, on the Panel before 2 other buttons would seem to invite the user who led should be lit. If the user selects the engine, 3 buttons would show on the front panel is turning left, right, or stop it.

    I was wondering if this is possible. If so, I was wondering how to do this.

    Thanks for the help in advance!

    bluexdestination wrote:

    Hi, I am new to the use of labview and I want to create a simple program such that when a user selects a button would appear another button.

    i.e. If the user selects LED, on the Panel before 2 other buttons would seem to invite the user who led should be lit. If the user selects the engine, 3 buttons would show on the front panel is turning left, right, or stop it.

    I was wondering if this is possible. If so, I was wondering how to do this.

    Thanks for the help in advance!

    If you rt click the buttons you want to display on the façade, creating > property node... There's a call from the "visible" property make these fake during initialization and then true when your motor or LED buttons are met

Maybe you are looking for