Possible to add 1, 2,..., N different buttons on the length of the array conditional?

I have a table with 1, 2 or more items

I want to open a dialog box of the user interface with buttons as much as my length of array.

AND I want to be able to customize each onClick unique function() for each button was only

The problem is that I can't do the code recognize each individual button once were created.

How you try to create the dialog box. Here is a way.

var myArray = ['one','two','three','etc.'];
function myButtonOnClick(){ alert(this.text);};
var dlg = new Window( 'dialog', 'Example' );
for(var b=1;b<=myArray.length;b++){
    eval('dlg.btn'+b+' = dlg.add("button",undefined,"'+myArray[b-1]+'");');
    eval('dlg.btn'+b+'.onClick = '+myButtonOnClick+';');
}

dlg.show();
alert(dlg.btn1.text);

Tags: Photoshop

Similar Questions

  • Is it possible to add an icon to a control of the enum?

    Hi all.

    I know that it is possible to customize controls, for example, you can add an icon (stickers) to a button:

    http://www.NI.com/Tutorial/14131/en/

    Is it possible to add an icon/decal to a control of the enum?

    Or do I me XControls for this?

    Thank you

    BR

    EWiebe

    Hi Wiebe,

    What about pictrings?

  • How can I add Internet browser back/forward buttons in the main toolbar?

    The developer of the software that I have tested is able to open web pages in a window within our software. We find this a great feature, even if it has a drawback: no previous/next buttons, have the habit of users through standard Internet browsers.

    Is it possible to add these classic WebHelp output main Internet navigation buttons to the toolbar? I noticed a few other outputs (HTML-help if I'm not mistaken).

    I noticed some similar topics in this forum, but the seem to discuss the navigation buttons sequence, we find less useful.

    Thanks for looking into this!

    Greetings,

    Olivier

    Thanks Rick!

    Found in your lean to the Skins folder - topic ' change of the function of the buttons go to function as browser buttons previous & next. "

    Olivier

  • Is it possible to add a description for each slide in the slide show as a slide to separate before each photo?

    I am trying to create a descriptive slideshow with explanatory text before each slide.

    Can you suggest the smart way to do it quickly?

    Hi graceplight,

    It is not possible to add descriptions to individual slides in Lightroom.

    Please take a look at the article, it may be useful: https://helpx.adobe.com/lightroom/help/playing-exporting-slide-shows.html

    Please let us know if it helps.

    Kind regards

    Tanuj Sandal

  • How can I add a "open a file" button on the Adobe Reader toolbar?

    I prefer to have a button on the toolbar that I sometimes forget the control + O shortcut. Looks like a major omission. How can I add that?

    Just right-click the toolbar, and then select file - open... It will add the icon open on the left side of the toolbar.

  • Is it possible to add a small image to view from the list of the press article?

    Hello

    I would like to ask a small image next to the link for my ad on my homepage - www.sunnysideinstantlawn.com.au - is it possible?

    Thank you

    Tammy

    Using the function of the news of the scrap and build your news with the web application instead.

    You can have multiple views of different lists, you can have a custom field multiline text box short introduction, title, date of the course and your image. With this, you can retrieve the value only of an image with the _value option in the image tag.

    You can then thumbnails of BC have only one large image and then small image from your listing.

    You have the detail view friendly of complete SEO for the web application as well as for the full article.

    You can do a lot, it's just how you feel you want and what you do with the installation and layout of it. Much better than the news Module

  • There is a way to get the "add to bookmark and rss button" within the url bar?

    I think that this two buttons must be in the url bar. Are easier to find and smaller than the bar.

    You can watch the classic extension theme restaurateur restore some features that has been lost with the arrival of the Australis style in Firefox 29.

    You can access the parameter of the extension of the CTR through the Options/preferences button in Firefox/tools > Modules > Extensions

    See also:

  • Possibility to delete records in two different table in the same DB

    Regarding the title of the Message, if it is possible, please show me the SQL (using MS SQL 2000) command to perform this operation. Thank you very much.

    clixmax wrote:
    > Regarding the title of the Message, if it is possible, please show me the SQL code
    > command (using MS SQL 2000) to perform this operation. Thank you very much.

    SET NOCOUNT ON

    REMOVE tableOne
    WHERE someCondition = #form.someCondition #.

    REMOVE tableTwo
    WHERE someCondition = #form.someCondition #.

    SET NOCOUNT OFF

  • Possible to add a new language in addition to the reconstruction of an application in HFM?

    Hi all - if I want to add a new language in a 9.3.1.4 HFM application, I understand the only way to achieve this is to recreate the application from scratch, by changing the language options in the application profile (file .alternance).

    Anyone know if there is there any utility to do this in the rear part (i.e. to create the records of the table / / necessary DESC), similar to the new utility created to change the number of periods?

    Thank you
    Robin

    There is no support for public services or workarounds to do this. It is unlikely to see improvement not work either since the EPMA is the orientation of the product.

  • Add alt text to Photoshop Button

    Is it possible to add alt text (or tips) buttons in Photoshop?

    Hi Julie,.

    Please see the following post:

    Alt on Photoshop button text

    Kind regards

    Akshay

  • Possible to add an image in a pdf header?

    I have Acrobat 9 and created a jpeg header in Photoshop. Is it possible to add this image to a header on the pdf pages? If so, how?

    Thank you

    There are at least two ways:

    1. the document > background > add/replace

    2. the document > watermark > add

    It is also possible by using a button, by setting the icon image you want, and then distribute it to all the pages and then flatten pages to convert the appearance of the button to the page content regularly.

  • Button in the list of actions for the lines

    Hello

    My data object repeatedly for different processes with status as Started, completed, has not
    I want to show a button in the list of actions for instances failed. Once you click on this button I want to trigger an alert

    Is it possible

    Actions are there now they give button at the view level, I am unable to get a button or set up an action at the level of line

    11G version of BAM


    Any suggestions

    Alert will be triggered separately for each row that is changed, so if your goal is to trigger the action of webservice as many times as the number of lines you have chosen in the action list, it serves very well your purpose. And you want to pass values from lines to alert, I suggest that make you all fields editable in list of actions (view open in edit mode and go to properties-> editable fields) and choose "Insert" action button action and put the lines in an another dataobject temp (and not your real dataobject that gets corrupted) set the alert on this temp dataobject and finally in your list of actions during execution, if you want to pass values from the list to the alert or change these values to pass new values, everything is possible and clicking "submit" should give you the expected results.

  • StackLayout - button on the same line

    Hello

    I have always a problem with button and stacklayout: I can't have different button on the same line.

    A simple code like:

    Page {
                Container {
    
                    layout: StackLayout {
                        orientation: orientation.LeftToRight
                    }
                    verticalAlignment: VerticalAlignment.Top
                    horizontalAlignment: HorizontalAlignment.Fill
    
                    Button {
                        id: button1
                        text: qsTr("button1")
                        layoutProperties: StackLayoutProperties {}
                        horizontalAlignment: HorizontalAlignment.Left
                        verticalAlignment: VerticalAlignment.Top
                        preferredWidth: 20
    
                    }
    
                    Button {
                        id: button2
                        text: qsTr("button2")
                        layoutProperties: StackLayoutProperties {}
                        horizontalAlignment: HorizontalAlignment.Center
                        verticalAlignment: VerticalAlignment.Top
                        preferredWidth: 20
                    }
    
                    Button {
                        id: button3
                        text: qsTr("button3")
                        layoutProperties: StackLayoutProperties {}
                        horizontalAlignment: HorizontalAlignment.Right
                        verticalAlignment: VerticalAlignment.Top
                        preferredWidth: 20
                }
            }
    }
    

    often I have my button to the location of horizontal line, but vertically, each button is on a different line...

    Is there someone who could tell me why?

    Thank you

    Container{
        layout: StackLayout{
        orientation: LayoutOrientation.LeftToRight
        horizontalAligment: HorizontalAligment.Fill
    
        Button{text: "One"}
        Button{text: "Two"}
        Button{text: "Three"}
    }
    

    She hope it helps

  • Set a style different cases for the same placeholder (data fusion) used two times in the same text

    Hello.

    I have a document with some parties updated with the fusion of data (via placeholders). Is it possible to set a style of different cases for the same placeholder in the same text. See the example:

    Mike runs its < < vehicule_placeholder > > in the city. But its < < VEHICULE_PLACEHOLDER > > is meant to be shared.

    If the value of this placeholder in the file merger is 'bike', the sentence should be:

    Mike runs his bike in the city. But his BIKE is meant to be shared.

    Is this possible? How?

    Thank you.

    You can do it. A character style for this configuration placeholder text, set in all caps.

  • Is it possible to have several predetermined webpages load immediately (within the different tabs of course..) at the push of a button

    I work as a translator and I use several different sites when I'm working. I would like to have all of these sites in a 'place' and simply press a button somewhere and have all load them at the same time, without having me load one-at-a-time. Is this possible?

    You can create a bookmarks folder and put the sites in it. Then just click with the right button on the file and select "open all - in.»

Maybe you are looking for