QML dynamic buttons

Is it possible to create dynamic buttons in QML?

I would like to create a variable array of buttons in QML, I don't know how much I need before execution.  It is not possible to do in QML.  If it is possible, is there an example I could mention?

Thank you!

Hello! This can be done. We discussed a similar topic today, please check this thread:

http://supportforums.BlackBerry.com/T5/Cascades-development/how-to-add-the-one-container-in-another-...

Tags: BlackBerry Developers

Similar Questions

  • New dynamic button for printing

    How to create the new dynamic button for printing in the dashboard?
    Before that I created the button with code below, but when I select the command prompt, the query depend on prompt will be changed, but the print page not be changed. Is it possible to solve my requirement? Thank you.

    < input type = "button" name = "Button" value = "Print" onClick = "window.open ('http://prcsgi03162:9704/analytics/saw.dll?Dashboard & CheminPortail = / shared, Kobe, _portal, kobe & Page = 9 & Action = Print & Format = pdf', 'Download');" return false; ">

    Published by: kobe on November 23, 2011 00:19

    Hello

    In your onclick try to paste the below:

    onClick = "return PortalPrint ("saw.dll? Table edge & CheminPortail = / shared, Kobe, _portal, kobe & Page = 9 & Action = Print & Format = pdf', true); return false; »

    Thank you

  • Dynamic button mode Full_Screen problem

    Hello

    I was wondering if someone could help me. I really really need help. It's the only thing holding my project and I had to restore yesterday.

    I have a button movie clip with a dynamic text inside field. I am loading dynamically to the scene, while a video is running in the background. I also have a button fullscreen (Flash component) on the stage. After clicking on the button full screen and mode Full_Screen static buttons, including the button fullscreen work without problem, but the dynamic button seems to not work at all. Basically, the button dynamic when you click it should change his message to "you clicked the button 1. This works in normal mode, but not in full screen.

    I tried btn_cuePt_1.enabled = true; but without success.
    It has something to do with not to use the events of full-screen?
    exp. stage.addEventListener (FullScreenEvent.FULL_SCREEN, fullScreenRedraw)

    Thank you!!

    The solution was so simple. I didn't have to completely redo, but I replaced the button full screen and everything is good now.

    Thank you, again.

  • deleteLater vs destroy QML dynamic objects

    this thread I know its safe in C++ to use deleteLater().

    even if the user creates a new before that was really destroyed

    the use of components that were created dynamically in QML I am always using. destroy() to remove

    in the most recent samples I noticed that instead of destroy() now deleteLater() was used in QML

    What is recommended?

    and deleteLater() in QML as safe as used from C++?

    If it works well?

    pseudocode
    
    NavigationPane
    property Page myPage
    
    pushing the Page:
        myPage = ...created by Component...
        push myPage
    
    coming back:
        onPopTransitionEnded()
            myPage.deleteLater
    

    .. If the user hits just the Action of pushing the new Page before destroyed

    It works the same from C++ (explained by ZMey)?

    No matter what happens to the property of myPage after the call to deleteLater won't change that past to the object of this deleteLater was called. It will be deleted again. Actually, a safe bet is to value null edit after the call to deleteLater so that you can not access it again. It doesn't matter if the 1st page was deleted after the creation of page 2. The object real edit pointed to before you change the value of the myPage property is not affected.

    A note on signals:

    DirectConnections have the behavior described above, but if this isn't what you want, you can use a QueuedConnection. See http://qt-project.org/doc/qt-4.8/qt.html#ConnectionType-enum for more details on this.

  • How to close qml page button

    How to close a qml page by calling button or image... Please note my coding below and correct it...

    {Of container

    horizontalAlignment: HorizontalAlignment.Right
    Button {}
    ID: nearby
    text: "EXIT".
    maxWidth: 300
                                
    onClicked: {}
    Close()
    }

    }

    }

    If your Page is a worksheet you can close

  • Adding listener to the dynamic button fields

    Hello members.

    I am facing a problem when adding buttons dynamic/multiple listener.

    I download the images corresponding to my custom buttons and display buttons in landscape Manager. Now, I need to specify a particular task for each field button. I read different posts, but could not able to find the success it please help me solve this problem.

    My code is: -.

    for (int i = 0; i)<>

    Items (Items) = XMLParseData.LevelOneVector.elementAt (i) obj;

    Bitmap mediumIcon = obj.getmBmpMediumIcon ();
    Btn1 = new BitmapButtonField (mediumIcon, mediumIcon);
    Btn1.setChangeListener ((FieldChangeListener) this);
    scrollhf. Add (btn1);
    }

    My class implements Fieldchangelistner

    and in the field changed the method that I'm confused what measures to follow

    ' Public Sub fieldChanged (field field, int context)
    {

    Please provide me with some help here, I would like to specify each button with forefinger, and then you can add an action to it.
    }

    Thank you

    };

    For this you must use the ButtonFields dashboard. This code can help:

    public class Abc extends MainScreen implements FieldChangeListener
    {
        int size=5;
        ButtonField button[];
        public Abc()
        {
                    size=5;// here give your Vector.size();
            createGUI();
        }
        public void createGUI()
        {
            button=new ButtonField[size];
    
            for(int i=0;i
    

    ==================================================================================

    Do not hesitate to click like button if the solution is correct;

  • Need help: parameter dynamic button prompt:

    Hi refugees,

    Gud morning...

    as I am new to OFA, am not able to solve this problem...

    I'm going to region table with 2 columns...

    in column 1, that I displays the list as assignment details, details rank, item details... etc.

    and second columns shows the buttons with the speedy right arrows(>>)... If ever, we click on the button, display the corrosponding region and execution of VO...

    For the list, will have to run the original Version, because the list is dynamic...

    But my real requirement is, should show only the buttons with the label names... maybe by the VO...

    How can I do...?

    Please... give your valuable suggestions...

    Thank you and best regards,

    Jaya

    Visit this link:

    https://forums.Oracle.com/message/3729432

    Sushant-

  • Add dynamic buttons to each line of the report and bind the data line to this line-specific buttons

    I have a page with a form in the upper part and a report at the bottom that is bound to a table. I need to add a pair of buttons for each row in the table and add dynamic actions for these buttons. I need to submit the data corresponding to the line to a REST service and update the table/line. I know that it is possible to add ajax call and refresh the table after receipt of the response. But I don't know how can I dynamically include a pair of buttons on each line and access the data corresponding to the record when a particular button is clicked. I was not able to find such a feature using the help page. Can you please let me know if this is possible. Thanks in advance.

    Here is the representation of how I need to the page to look like.

    Col 1

    Col 2

    Col 3

    data 1

    data 21

    data 31

    Button 1

    Button 2

    data 2

    data 22

    data 32

    Button 1

    Button 2

    data 3

    data 23

    data 33

    Button 1

    Button 2

    data 4

    data 24

    data 34

    Button 1

    Button 2

    I should be able to access the data 1, data21, data button 31 11 and button21 etc.

    Select data1,

    data2,

    data3,

    ......,

    Button1 null,

    Button2 null,

    ROWID r_id

    Of...

    If you change the column for button1 and navigate to the area of column formatting you can create your button here, in several different ways.  You will need to play with the way you prefer.  See below:

    or or you could use and apply css of your theme.

    You create also two buttons in a single column.  From here you can reference columns in your selection by using the format #COLUNMNAME # (as I did with R_ID).

    Then, you will need something similar for all columns that you want to be able to recover when you click the buttons.  See below:

    -It would be Data1 column

    #DATA1 #.

    You would do this for each column that you want to access click the button as shown above.  You can skip this step and use jquery to iterate through the DOM using the. closest() and. find() and give each column a separate class.  Is your preference.

    You then create a dynamic action, when it is clicked on .button1.  Now that you have this object, you can get the id of the trigger object that would be your r_id and from here you can access all your individual data points (all this in a JavaScript in the dynamic action) and assign to items hidden on your page.  The next step in this dynamic action, you could run pl/sql and transmit the page elements.

    Hope that all of the senses.

    David

    Post edited by: DLittle

    As a bit of clarification: the r_id column does not have to be rowid, but it must be unique for each return line.  You can use your primary key or rownum.  Just what works for your scenario.

  • How to trigger a dynamic button Action

    Hi all pros

    I have a button, which is optional if the user wants to do.
    button «write a note/comment»
    When this button is click, it should show the text box on another region or a region

    But the button must have a certain value,
    I'll put it to null, and dynamic action, click the button on the value of the null condition button then view region

    But does not work any idea, what I am doing wrong, what should I do (other work autour)?

    Thanks in advance

    Hello

    Why don't you use a checkbox instead of a button, take a look @ the demo page next,

    http://Apex.Oracle.com/pls/Apex/f?p=57771:25:379751703921101:

    user name: test
    Passwrd: test

    1) Create a list of values under shared components
        It should have a single entry, for the display value leave a space, return value is 1.
    
    2) now add a checkbox to your page and select the LOV as the list of values you created.
        display extra values property should be set to No for the check box.
    
    3) now add a standard dynamic action to your check box
        condition should be "equal to" - 1
        True action should be "show"
        selection type should be "item" and select the text area.
    

    That's all. now the text box is hidden when you uncheck the box and displayed when you check the box.

    hope this helps,

  • Hide a dynamic button with check boxes and actions.

    Good, everyone.
    Now I'm trying to do is create a dynamic action to hide a button
    When a box is selected. It would be simple if the checkbox
    created dynamically.

    I have a report that contains a dynamically created checkbox column hollow
    the apex_item.checkbox command. I want to be able to hide a button if no
    that the boxes have been checked, but I don't know how to make a reference to
    This point when creating a dynamic action.

    You guys could help me once again?
    Thanks for the attention.



    Best regards, Leandro Freitas.

    Try this:
    1 put a class on the checkbox example
    apex_item. CheckBox (p_idx-online 1, p_value => NOM_PAPEL, p_attributes => "class ="mycbclass"onChange = hideRevoke ();', p_checked_values-'UNCHECKED' online")

    2. create a dynamic action:
    Event: change
    Type of selector: jQuery Selector
    JQuery selector: input.mycbclass
    Condition: Expression JavaScript
    Value: $('input.mycbclass:checked').length > 0

    Action: hide
    Create opposite: checked
    Selection type: Elements (s)
    Article (s): click on your button

    Maybe I should point out that if you use a model button then you will need to ensure that the model has a button id so that the dynamic action allows to identify the button.

    Rod West

    Published by: Rod West February 24, 2012 13:52

  • Flash Pro + createjs toolkit (dynamic button problem)

    Hello

    I have been using the Toolbox for awhile, it seems to work, but I noticed a problem.

    When you create a button and place it on the stage and export it, it works very well.

    But if you try to do this:

    var container is new createjs. Container();

    the var button;

    for (var i = 0; i < arr.length; i ++) {}

    button = New lib. MyButton();

    container.addChild (bitmap);

    }

    stage.addChild (container);

    Crazy loop in the States of the button (upward, more, low, vile), and if you put button.stop (); He loses his mouse and mouse down. (need to manually control)

    I want to dynamically create buttons to add to the scene.

    Any ideas?

    Looking through the generated js code, I noticed this line

    new c.ButtonHelper (button, 0, 1, 2, false, new lib.) MyButton(), 3);

    That did the trick.

  • dynamic button action

    I have a button that submits a page. When a user clicks this button the button should be disabled
    and the label of the button should change to "present" to "loading...". ».

    I was able to get the button disabled by dynamic action. But I don't seem to be able to get the label to change.

    The button is a button style html.

    I tried the following dynamic:

    Event: click on

    ExecuteJavaScriptCode: this.value = "loading...". »
    SetValue: Static assignment: loading...

    selection type - element triggering and point

    Someone has an idea what I am doing wrong?

    Thank you
    Wayne

    Edited by: wcoleku may 6, 2011 11:11

    No problem at all. In this case, instead of use 'this' in your dynamic action javascript code to reference the button, use:

    document.getElementById().value="loading....";
    

    You don't even have choose anything in the section 'Elements affected', you leave "- select Type -" selected.

    Sergio

  • The dynamic button and the field 'how to' guidelines

    How can I define several parts of my work as dynamic - make a buttons that change size (such as population) according to the entered text; the columns that also change the size and moving the other columns, keeping constant, previously defined spaces between them? Where to start? Choose which application?

    At this point, I decided my work in Illustrator and exported in the form of an images and html for editing in Dreamweaver or elsewhere.

    P.S. I have designed my whole life, but I only met the behind the scenes of the substructure of web design - it is not my first and last question around this issue. Suggestions, tips, or huge conferences of briefing as well as simple, but useful guidance - in what direction I should start watching - will be really appreciated.

    I strongly suggest you move on the Dreamweaver forum (using this software) - and abandon all hope to found your web page entirely on slices of another application. I also recommend to learn the basics of HTML before you try to go further. Web design is a very different beast to print design.

  • Unique event for several dynamic buttons

    I want to use a function of earphone unique event to manage several dynamically created movie clips, each movie clip triggering a different answer. I am pulling information from an xml file, which will in turn create x video clips for the information found. Each video clip would be clickable, and each would have a unique result. Sake of argument: each created movie clip dynamically would trace his name when you click on it.

    Download

    demoX.addEventListener (MouseEvent.CLICK, traceName);
    demoY.addEventListener (MouseEvent.CLICK, traceName);
    demoZ.addEventListener (MouseEvent.CLICK, traceName);
    {traceName (event:MouseEvent)}
    trace (/ *? * /); meet "demoX" or "James" or "amel" respectfully
    }

    I guess I need to create my clip dynamically and then dynamically create an event listener for it. But then I don't know how I would have access to information that the user has clicked. I could be away from the base. I did this sort of thing with AS2 (and maybe my method was not quite at the level of standards,) but I can of course find a way to do this in AS3. Any help would be appreciated.

    Thank you!

    the event.currentTarget will return the released movieclip. You can add any property/value you want (for example, a name property) your movieclip buttons. This property is accessible via event.currentTarget.yourProperty (for example, event.currentTarget.name) in traceName().

  • Get a dynamic width of a dynamic button

    Hello, I'm trying to understand what is the width of a button dynamically generated compenent (in a forloop). Here is my code:

    var buttonFilterData:Button = new Button();
    set the data of the button - the filter data
    buttonFilterData.id = "instance__" + items ['data'];
    buttonFilterData.label items =
    ['label'];
    buttonFilterData.data = elements ;
    set the appearance of the text button
    buttonFilterData.setStyle ("fontWeight", "normal");
    buttonFilterData.setStyle ("fontSize", "10");
    buttonFilterData.setStyle ("textAlign", "Center");
    define the attributes of position buttons
    buttonFilterData.height = 20;

    THIS PART DOES NOT WORK!)
    Alert.Show (buttonFilterData.Width.ToString ());

    buttonFilterData.x = event.currentTarget.mouseX;
    buttonFilterData.y = event.currentTarget.mouseY;
    Add the event listener of keys used to drag the component
    buttonFilterData.addEventListener (MouseEvent.MOUSE_DOWN, dragIt);
    Adds the button to the Web as a child
    memberFilters.addChild (buttonFilterData);

    Im trying to get a button's width (the width will depend on the length of the text within the key) to determine where I wasn't the button to be placed in x, is to coordinate a canvas. Help!

    Click on the Web and you will see how the button is centered.
    The key is to add the listener to the button creationComplete.

    http://www.Adobe.com/2006/mxml '.
    layout = "absolute".
    xmlns:view = "view.*".
    >


    Import mx.controls.Button;

    private function clickHandler (e: Event): void {}

    create a new component button
    var buttonFilterData: button = new Button();
    buttonFilterData.label = 'Label XXXX';
    set the appearance of the text button
    buttonFilterData.setStyle ("fontWeight", "normal");
    buttonFilterData.setStyle ("fontSize", "10");
    buttonFilterData.setStyle ("textAlign", "Center");
    define the attributes of position buttons
    buttonFilterData.height = 20;
    buttonFilterData.addEventListener ("creationComplete", btnCreateCompleteHandler);
    buttonFilterData.x = e.currentTarget.mouseX;
    buttonFilterData.y = e.currentTarget.mouseY;

    cvs.addChild (buttonFilterData);

    }

    private void btnCreateCompleteHandler(e: Event): void {}
    var ix: int = e.currentTarget.x - (e.currentTarget.width / 2);
    IY var: int = e.currentTarget.y - (e.currentTarget.height / 2);
    e.currentTarget.x = ix;
    e.currentTarget.y = iy;
    }

    ]]>


Maybe you are looking for