Announcement

Collapse
No announcement yet.

Add buttons to array by name?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Add buttons to array by name?

    Hi,

    How can i list buttons in widget?
    I have 100 buttons, and want to make an array for them.
    Or need to add manually all buttons?

    #2
    Eyo,

    It depends on what you want to do with the buttons.
    I do not have time to show an example but you can, for example, use two widgets, one is a container, scroll box for example, and then a second widget is just a button. You can then on Widget Scrollbox construct have the array of buttons that are creating each button and assigning them to the container/scroll box.

    Comment


      #3
      Thank you. My buttons are in in scrollbox, i will try this.

      Comment


        #4
        If you have already manually added the buttons to the scrollbox, you can:

        Click image for larger version  Name:	Annotation-20200323-082401.png Views:	0 Size:	66.0 KB ID:	1735876

        Ensure you flag the scrollbox as variable in the details panel - a tickbox at the very top.

        If you're dynamically spawning custom buttons and populating the scrollbox during run-time, you can, of course, skip casting and fill the array directly.

        Comment


          #5
          Originally posted by Hermyth View Post
          Thank you. My buttons are in in scrollbox, i will try this.
          Good luck!

          Comment


            #6
            Originally posted by Everynone View Post
            If you have already manually added the buttons to the scrollbox, you can:

            Click image for larger version Name:	Annotation-20200323-082401.png Views:	0 Size:	66.0 KB ID:	1735876

            Ensure you flag the scrollbox as variable in the details panel - a tickbox at the very top.

            If you're dynamically spawning custom buttons and populating the scrollbox during run-time, you can, of course, skip casting and fill the array directly.
            Thanks, my Scrollbox is static.


            Run to the next problem:

            My main scrollbox has child scollboxes inside. Can i get children's children buttons somehow?
            Last edited by Hermyth; 03-24-2020, 01:44 AM.

            Comment


              #7
              Yes, the same way you did before,

              Scrollbox parent -> ForLoop (Scrollboxes) -> Get Button Array

              Comment


                #8
                Originally posted by Celldelning View Post
                Yes, the same way you did before,

                Scrollbox parent -> ForLoop (Scrollboxes) -> Get Button Array
                Ohh, yes thanks.

                Comment


                  #9
                  No problems!

                  Comment

                  Working...
                  X