HISE Logo Forum
    • Categories
    • Register
    • Login

    Panel getItemText

    Scheduled Pinned Locked Moved Feature Requests
    3 Posts 2 Posters 905 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.
    • d.healeyD
      d.healey
      last edited by d.healey

      This would be a useful function when using panels to create custom combo boxes.

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

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

        Actually, if you're using a combobox type Panel, you'll probably have a array containing the items in the data object. In this case, you can write a simple function yourself:

        
        inline function getItemText(panel)
        {
            return panel.data.items[panel.getValue()];
        };
        

        I am not sure if adding a function to the API will be useful because as soon as you customise the data model, you're back on your own.

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

          Good idea!

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

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

          23

          Online

          1.8k

          Users

          12.1k

          Topics

          105.2k

          Posts