HISE Logo Forum
    • Categories
    • Register
    • Login

    Get Num items in Combobox?

    Scheduled Pinned Locked Moved Solved Scripting
    9 Posts 3 Posters 64 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.
    • ChazroxC
      Chazrox
      last edited by

      How do I get the length of combobox items?

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

        @Chazrox Convert it to an array - String.split(), then use .length()

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

        ChazroxC 1 Reply Last reply Reply Quote 1
        • ChazroxC
          Chazrox @d.healey
          last edited by

          @d-healey Let me try. Thanks! 🤛

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @Chazrox
            last edited by

            @Chazrox I think the “max“ property is also updated to reflect the number of items so you should be able to just query that (not 100% sure though).

            ChazroxC 1 Reply Last reply Reply Quote 2
            • ChazroxC
              Chazrox @Christoph Hart
              last edited by

              @Christoph-Hart Thanks! I'll check that. That sounds way easier. 🤛

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

                @Chazrox Yes Console.print(ComboBox1.get("max"));

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

                ChazroxC 1 Reply Last reply Reply Quote 0
                • ChazroxC
                  Chazrox @d.healey
                  last edited by Chazrox

                  @d-healey How do I get the itemText of the currently selected index of a viewport panel? Im gonna use a viewport instead of combobox.

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

                    @Chazrox Use split (again) to convert the list of items to an array, then use the viewport's value as the array index.

                    HiseSnippet 883.3ocsV01aaaCDlzIpnV6ErNzuN.gf9Amgh.ojXmBTTzt3jrYrkTi4rfArMTPKcJhHTjB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rBzUsR9WqTNsvB
                    

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

                    ChazroxC 1 Reply Last reply Reply Quote 1
                    • ChazroxC
                      Chazrox @d.healey
                      last edited by

                      @d-healey That worked. Was confusing at first but I get it now. 🙏

                      1 Reply Last reply Reply Quote 0
                      • ChazroxC Chazrox has marked this topic as solved
                      • First post
                        Last post

                      10

                      Online

                      1.9k

                      Users

                      12.4k

                      Topics

                      108.1k

                      Posts