Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Dynamic buttons

lucaver89
2019-05-02
2019-05-03
  • lucaver89 - 2019-05-02

    Hi to all,

    Is possible create a button in a specified position by structured text function?

    For example, I would like assume that in a part of my program there is a variable called ```

    num_of_buttons :UDINT :=3

    ``` and in the main program something like that

    Β  Β FOR index:=1 TO num_of_button DO
    Β  Β  Β  Β create_new_button(W:=50, H:=50, X:=100, Y:=100, "img:="something");
    Β  Β END_FOR
    

    I'm really sorry but I'm trying to learn by myelf

    Thanks
    Luca

     
  • Lo5tNet - 2019-05-02

    I believe this can't be done in CoDeSys.

    Your best bet is to put the most buttons you would ever need on a page then use the code to define what buttons are visible, the location of the buttons, and the size of the buttons.

     
  • dkugler - 2019-05-02

    Originally created by: D. Kugler

    the question ist, what shell the function of this buttons should be? Show a image and be hidden, if you click on it?

     
  • lucaver89 - 2019-05-03

    The function task should be like to https://docs.oracle.com/javase/8/javafx ... utton.html with all metod inside.

    If is not possilble is not problem, I'll create a specified number of button.

    Another issue, Is possible load an image from usb or specified path?

     

Log in to post a comment.