HISE Logo Forum
    • Categories
    • Register
    • Login

    Creating columns in panel with ("\t") and ("\n")

    Scheduled Pinned Locked Moved Scripting
    10 Posts 2 Posters 403 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan KorneffD
      Dan Korneff
      last edited by

      Hey guys,
      Looking for some scripting advice. I'd like to create a panel that contains some various elements (label, combobox, etc...) and arrange them within the panel.

      I can arrange text with something like:

      Content.setPropertiesFromJSON("Panel1", {
        "popupMenuItems": "A\tB\tC\tD\nA\tB\tC\tD\n",
      });
      

      What tools am I looking for to script elements?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Dan Korneff
        last edited by

        @dustbro Paint routines

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Dan KorneffD 1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff @d.healey
          last edited by

          @d-healey Ultimately I'm looking to make a table that works as a sequencer in conjunction with the MidiPlayer.
          something like this:
          panel.png

          Would that be a Viewport instead?

          d.healeyD 1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by Dan Korneff

            @d-healey reading the Paint routine API now.

            Seems that I'm looking to make a Table List Box...
            https://docs.juce.com/master/tutorial_table_list_box.html

            @Christoph-Hart any way to mimic this with current HISE resources?
            edit... nevermind... I'm tinkering :)

            1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Dan Korneff
              last edited by d.healey

              @dustbro There are a few ways to do it. For the sliders I'd use standard controls although you could create them with paint routines if you're feeling adventurous. For the scrolling part use a viewport, inside the viewport put a panel and use paint routines to draw all of the text and show which line is selected etc. The buttons would be part of the paint routine.

              This is something similar I made

              afde7167-0de6-415a-b776-ff4129277f6c-image.png

              If this is your first time playing with paint routines and panels then I would start with something much simpler. I'll be doing a video about getting started with paint routines next month!

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              Dan KorneffD 2 Replies Last reply Reply Quote 1
              • Dan KorneffD
                Dan Korneff @d.healey
                last edited by

                @d-healey 😘 Can't wait to watch!

                1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @d.healey
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • Dan KorneffD
                    Dan Korneff
                    last edited by

                    Is there a way to set JSON properties for all elements in an array?
                    I'm trying to reference the API, but the link is 404

                    404 Not Found

                    favicon

                    (docs.hise.audio)

                    for individual components, I've used:

                    Content.setPropertiesFromJSON("ComboBox1", {
                      "width": 100,
                      "height": 50
                    });
                    

                    I tried replacing the component with a for-in loop... no good.

                    Content.setPropertiesFromJSON(
                    for(c in ComboArray) Content.getComponent(), 
                    {
                      "width": 100,
                      "height": 50
                    });
                    
                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff
                      last edited by

                      Not enough coffee... I guess I just have to put the setPropertiesFromJSON IN a for loop 😅 😅

                      1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @Dan Korneff
                        last edited by

                        @dustbro

                        I'm trying to reference the API, but the link is 404

                        Press F1 when you're in HISE ;)

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        28

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        105.7k

                        Posts