Copy the InDesign UI of Script text into the list item

Hello world

I wrote a script code user interface to create a terminology database.

I want to be able to click on an item in the list of all the columns and copy the text in edittext field.

I don't know if I need to create a button for this or is - it possible to do a right-click of the mouse to copy text?

Here is the code:

var w = new window (' dialog {text: 'Blatchford termbase', alignChildren: 'fill'} "");
w.Spacing = 0;

var headers = w.add ('group');
headers. Spacing = 0;
headers. Margins = [0,5,0,0];
dimH var = [0,0,200,20];

headers. Add ("statictext', dimH, '\u00A0English'");
headers. Add ("statictext', dimH, '\u00A0French'");
headers. Add ("statictext', dimH, '\u00A0German'");
headers. Add ("statictext', dimH, '\u00A0Italien'");
headers. Add ("statictext', dimH, '\u00A0Spanish'");
headers. Add ("statictext', dimH, '\u00A0Norwegian'");
headers. Add ("statictext', dimH, '\u00A0Russian'");
headers. Add ("statictext', dimH, '\u00A0Turkish'");

headers.graphics.backgroundColor = w.graphics.newBrush (w.graphics.BrushType.SOLID_COLOR, [0.7,0.7,0.7],1);

for (var i = 0; i < headers.children.length; i ++)

headers. Children [i]. Graphics.font = scriptui.newFont ('Myriad Pro', 'fat', 16)

var column = w.add('group{multiselect:true}');
Columns.Spacing = 0;

CGEM var = [0,0,200,600];

var col1 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col2 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col3 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col4 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col5 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col6 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
col7 var = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);
var col8 = columns.add ("listbox", CGEM, ["Dorsiflexion", "Field", "trans-tibiale", "trans-fémorale"]);

var user_input = w.add ('group')
entry var = user_input.add ('edittext', dimH, ");
entry. Characters = 30;
entry. Alignment = 'left';
entry.active = true;

col1. Selection = 0;

converting the vars = user_input.add ('button', undefined, "Convert to lowercase");
convert.onClick = function () {entry.text = entry.text.toLowerCase () ;}
user_input.orientation = 'row';
user_input. Alignment = 'left';

w.Show ();

Any help or comments would be greatly appreciated

Try this

col1.onChange =
 col2.onChange =
 col3.onChange =
 col4.onChange =
 col5.onChange =
 col6.onChange =
 col7.onChange =
 col8.onChange =
 function() {
  entry.text = this.selection? this.selection.text : "";
  }

Loïc

Ozalto | Productivity-oriented - Loïc Aigon

Tags: InDesign

Similar Questions

  • Refuses to pages to center the list items correctly (Pages 5.6.1)

    Hi guys! There is a problem with centering of the list items. When I create one of all kinds (numbered for example) and you want to place it in the center of the document, I get this:

    To move it to the right place (and I doubt that it is in fact a true Center) I need to use the list tab and use the left alignment as in the following image:

    Is there a way to make Pages to do things - to move the text with a number when I want to place it in the center of the document?

    Tried everything. Nothing works.

    Thanks in advance!

    [deleted - / viking] Thought I had it fixed, but apparently not.

  • How to get the content of the list item selected ListView using CPP?

    Hello

    I do a simple application, get the content of the list item selected ListView using CPP, in the main.qml file, I created a listview using XMLDataModel and I got the selected listview using dataModel.data (row) .attributeNameInXmlfile in qml. content as in the same way the ListView using cpp.please help me I want to get the content of the listitem selected.

    Here is my code

    hand. QML

    import bb.cascades 1.0
    
    Page {
        content: Container {
            id: mainContainer
            objectName: "container"
            // property alias selectedText: selectedTextField.text
            //property alias deselectedText: deselectedTextField.text
            ListView {
                objectName: "listView"
                dataModel: XmlDataModel {
                    source: "models/items.xml"
                    id: model
                }
                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            title: ListItemData.title
                        }
                    }
                ]
            }
            TextField {
                id: selectedTextField
                objectName: "selectedTextField"
                text: ""
            }
            TextField {
                id: deselectedTextField
                objectName: "deselectedTextField"
                text: ""
            }
        }
    }
    

    App.cpp

    #include "app.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace std;
    
    using namespace bb::cascades;
    QObject *textFieldSelected ;
    QObject *textFieldNotSelected;
    QObject *list;
    App::App() {
        QmlDocument *qml = QmlDocument::create("main.qml");
        AbstractPane *root = qml->createRootNode();
        list = root->findChild("listView");
        textFieldNotSelected = root->findChild("deselectedTextField");
        textFieldSelected = root->findChild("selectedTextField");
        QObject::connect(list,SIGNAL(selectionChanged (QVariantList, bool)),this,SLOT(changeText(QVariantList, bool)));
        Application::setScene(root);
    }
    
    void App::changeText(QVariantList indexPath,bool selected) {
    
    }
    

    App.HPP

    #ifndef APP_H
    #define APP_H
    
    #include 
    #include 
    #include 
    
    /*!
     * @brief Application GUI object
     */
    class App : public QObject
    {
        Q_OBJECT
    public:
        App();
    public slots:
    void changeText(QVariantList ,bool );
    
    };
    
    #endif // ifndef APP_H
    

    Try this.

    void App::changeText(QVariantList indexPath,bool selected) {
        XmlDataModel *model = (XmlDataModel *)list->dataModel();
        QVariantMap map = model->data(indexPath).toMap();
        // map is your data in QVariant
        qDebug() << map["title"].toString();
    }
    
  • Show the popup inside the list item (JDEV 12 c)

    Hi all

    I'm having a problem when I try to display the pop-up window on an image, click.

    Inside the image, there is the showPopupBehaviour that triggers the popup.

    It is not working properly if I put the popup on the outside of the list item, but the problem is that I need inside so I can view the attributes of each element.

    The list with the elements (each icon should trigger the popup with information components):

    popup issue.png

    Best regards

    Luis Cabaco

    The problem is not the popup, but how you load the data from the context menu.

    The popup will match every time, only data changes.

    Make sure that the popup contentDelivery has the value "lazyUncached".

    Timo

  • How to remove the list item empty forms of oracle?

    Hello

    How to remove the list item EMPTY forms of oracle?

    I create two list items

    (1) basic

    (2) advanced

    But when I select list or display the runtime display form element 3 element EMPTY automatically, but I add what it shows I want to delete! How?

    He has named REQUIRED = NO item property

    If you set YES and then it does not show. but you must give an initial value.

    Hamid

  • Limit the width of the list item

    Hi all

    I use Oracle Application express 4.2.
    I have change a number filed for select list and created a dynamic lov to it.

    the problem is that its width increases dynamically.
    means, if I have a value "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
    Width of the list will be the same length of the above "AAA...". ».


    How can I limit the width of the list item to a specific value? There is no such property for this it.

    Thank you.

    -Edit the item selection list.
    -Find the section 'Element '.
    -Enter the following value for the parameter "Attributes of the HTML Form element": style = "width: 100px;"
    -Adjust the number of pixels to your needs.

  • FRM-30351: no list items defined for the list item

    Hello
    I used a dynamic list, and when I compile this message appears:
    FRM-30351: no list items defined for the list item.

    If the list is not needed, it's just a warning and you can ignore it.

  • The list item file (oracle form 6i)

    Hi all


    I have a problem regarding complete recording in the list item

    I have this code works in Oracle 10 g Forms Builder

    DECLARE
    REPORT NUMBER;
    Problem EXCEPTION;

    BEGIN

    -to fill the
    STATUS: = POPULATE_GROUP ('RG_PROD_DESC');

    -Make sure that the select statement is executed successfully.

    IF <>STATUS 0 THEN
    PROBLEM;
    ON THE OTHER
    -to fill the list item
    POPULATE_LIST (' DESCRIPTION ', 'RG_PROD_DESC' ");
    END IF;

    EXCEPTION
    Problem WHEN THEN
    MESSAGE ("we have a problem to query the table PRODUCT.');
    END;


    but when I try this code in Oracle Forms 6i, it did not work.


    can someone help me in this matter?

    Try this way. I changed some of the code to test on my system.

    DECLARE
    STATUS NUMBER;
    Problem EXCEPTION;
    list_id ITEM;
    BEGIN
    list_id :=Find_Item('Blockname.Listname');
    -- to populate the group
    STATUS:=POPULATE_GROUP('RG_PROD_DESC');
    -- Check that the select statement was executed successfully.
    CLEAR_LIST(list_id);
    POPULATE_LIST(list_id, 'RG_PROD_DESC');
    
    EXCEPTION
    WHEN others THEN
    MESSAGE ('We have a problem to query the PRODUCT table.');
    END;
    

    Best regards
    Franck Giri

  • How to get the value of the list item

    Hi all
    How to get the value of the list item?

    I have a problem with the list item object
    in Oracle Forms.
    How can I retrieve the selected item from
    a list?
    I have not found any function as ' list. GET_
    SELECTED_ITEM()'...



    Thank you
    Bala

    Hello

    You get the value as any other element of forms:

    :value := :block.list_tem ;
    

    François

  • Problem with the list item

    Hi all
    I am facing a problem with the list item in my form. In my form, I have a list item (tmd_stat) with 3 list of values as the item complete, incomplete and null.this lies in the control block.

    I have a block (Detail) which is the database block.status_disp [point List] is one of the .an article on the value of list tmd_stat is filling with different values.

    an alert message (you want to change the status? Yes/No) will appear when we change the list item. If I click YES then the list works and retail block point status_disp is filled with a different list of values. If I click on 'No' the list value will be set to changed value.i.e suppose that I'm changing the Complete incomplete list item, alert message will be displayed. If I click on 'No' the cursor is placed on incomplete but incomplete. How can I place the cursor on the full value.

    Can you please give me the solution.

    Thank you

    Hello

    Save the old value in a variable and then if the user clicks on No. then reassign this value to the list item.

    Kind regards

    Manu.

  • Switch poplist display of the list item selected for its value of list item

    Is it possible to change the display in a poplist of the list item to its corresponding list item value?

    For example, I have a list item is filled with a group of records. Name of the country (e.g., Canada) is the list item, and the country code (e.g. CA) is the value of a list item.

    I want users to be able to see the names of countries, when the list is expanded. However, once users choose and click on a country, the country code must be included in the display.

    I suppose that if it is possible to do at all, he would be using a trigger a times-news-point-instance, but I do not know where to go to from there. Please let me know if you need clarification or more information from me. I'd appreciate any help you can give me.

    With the help of Oracle Developer Suite 10 G
    Version of Forms - 9.0.4.3.0

    Hello
    Welcome to the forum,

    Just an idea. Why you do not keep the country with the description at the time code. I mean, it's like you say you query group will be like this...

    SELECT code, description
    FROM table_name;
    

    So, I mean just change this query to concatenate the code with description. for ex.

    SELECT code, code||' - '||description as description
    FROM table_name;
    

    It will show you the code and the name in the list. So, it will not trigger etc.

    -Clément

  • you want to add data dynamicallly in the list item.

    Hello friends...

    My data to see & I want to add that the list item data can add that?

    Thank you...

    In this case, your list item can be a data point and then your gave values in the elements in the list property and has set some initial value too, no?

    If so,.
    Remove all items in the list by pressing ctrl SHIFT<>
    Then give any character dummy in the list item and a space in the value that grant list them agenda.
    Give the initial value also as space so as to avoid the warning...

    Now, try

  • Re: Empty record in the list item

    I would really appreciate it someone could help me.
    I created a recordgroup for the list item and filled the same. All values are dispalyed correctly but in addion an empty record is appear. How can I remove the blank record? My syntax are as under:

    declare
    v_rg NUMBER;
    v_GrpID RECORDGROUP;
    Start
    v_GrpID: = CREATE_GROUP_FROM_QUERY ('DRVCODE', ' SELECT led_name, led_name FROM master_ledger where cmp_code =: global .cmp_code ORDER BY 1');
    v_rg: = POPULATE_GROUP (v_GrpID);
    IF v_rg = 0 THEN
    POPULATE_LIST ('master_driver.tdrvname', v_GrpID);
    END IF;

    I'm happy for you... Please mark my answer as correct ;-)

  • Can I copy the list of names of files and paste them into a table

    I have a list of files in a folder and here paste the titles only in a table

    You can create a list of text files by using the command prompt.

    • Open a command prompt in the folder that you want to get the list of. (You can open a command prompt and navigate to your required file, or use the Solution Explorer and press and right click on your file at the same time. Then you should see "open a command here window' in the menu - click on it.)
    • Enter the command "dir /b > filenames.txt" (without the quotes), then simply type dir /b > filenames.txtand press return/enter to transport.
    • Use Explorer to navigate to your file and you should now see a text file called filenames.txt. Open and it must contain a list of files. Then, copy and paste the list where you want to.

    If all goes well, I understood your question correctly, if so, hope it helps.




  • How can I copy the list of names of files in the finder and set the Clipboard filenames separated by commas?

    Hi guys, I was wonder if anyone can give me a hand with a script.

    I need to be able to paste a list of file names of the files as follows:

    0001.jpg 0002.jpg 0003.jpg 0004.jpg

    At the moment, if I select the files in the Finder, copy to the Clipboard and paste them in TextEdit, they are like this:

    0001.jpg

    0002.jpg

    0003.jpg

    0004.jpg

    I found a similar but slightly different script and I don't know how to change it. Here it is:

    Define extension_list to {"jpg", "" JPG","jpeg","JPEG"}

    the value cbNames (Clipboard text) paragraphs

    Set csvNames to {}

    the tid value delimiters to point to the text of the AppleScript

    the text value of the AppleScript point delimiters ".»

    -now, make a list of names without extensions

    Repeat with the names in cbNames

    If the point 2 of the text names is extension_list then

    copy of text 1 of names at the end of csvNames

    end if

    end repeat

    Journal csvNames

    -now the filenames as comma CONCATENATE string separated

    the text value of the point delimiters AppleScript «»

    csvNames value cross-as text

    the text value of the point AppleScript delimiters tid

    There is an easier way. Open a TextEdit document and paste the list in. Place the cursor at the end of the first item and drag it to the start of the second.

    Press on + command + c to copy and then command + f to bring up find it. Press command + v (do not click in the first search field). Check the 'Replace' box, click in the field replace, and then type a comma and a space.

    Click 'All' and then 'done '.

Maybe you are looking for

  • How can I prevent the Thunderbird combining my address books?

    I have three address books. One of them use 98% of the time. The latest version of TB combines all three, when I go to the write screen and I have to click on a window to select the one I want. It's a nuisance. If I wanted that everything in an addre

  • Update of 12.4. Not all music albums appear in "Albums".

    12.4 must be the worst update ever. Everything was fine until I updated. Among other silly changes, not all my music albums now appear in "Albums". Some appear in both "recently added" and "Albums", some only appear in one or the other. I don't care

  • Excited for my new Y40-80 to realize that he was severely damaged...

    Like all excited, I shoot my new Lenovo Y40 - 80 out of the box, I hear little bits and pieces hit my floor and wonder what it might be. Soon enough, I realize that these sounds I heard were pieces of my new laptop... http://imgur.com/a/WQQfx

  • DESIGNATION OF THE USB

    How to change a usb designation in Window s Vista. My hard drive external was F: and is now G: while my flash drive G: and is now F:.

  • I have a problem with my canon cam works only not with the eos unility now

    OK I use to connect my cam and it worked fine until the last update and now it has stopped working, I've been on with cannon and put to update the software and they say it's a problem with vista 64, do not leave the work of software he will work with