Forum
    • Categories
    • Register
    • Login

    Labels being editable by default

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 27 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.
    • pcs800P
      pcs800
      last edited by

      How can I set Hise to make labels non-editable by default? It seems to me that having them editable is almost never going to be needed by a user. I am constantly going back to projects to make sure I set them all as non-editable.

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @pcs800
        last edited by

        @pcs800 You'd need to modify the source code or use a helper script.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        pcs800P 1 Reply Last reply Reply Quote 0
        • pcs800P
          pcs800 @David Healey
          last edited by

          @David-Healey Can you help me understand why editable is the default? Is there some reason users need to be able to change the label text?

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @pcs800
            last edited by

            @pcs800 It depends on what you're using it for. If you need to get user input then it needs to be editable. I pretty much never use labels, panels and look and feel do the job most of the time for me.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            HISEnbergH 1 Reply Last reply Reply Quote 0
            • HISEnbergH
              HISEnberg @David Healey
              last edited by

              Personally I use panels in most cases as well.

              In your case, I know all of my components begin with a prefix indicating their type.
              Examples:

              knb: knobs
              btn: buttons
              lbl: labels
              

              I do this to be able to assign LAFs. control callbacks, etc. as I want.
              Assuming you did something similar, it would be simple enough at the outset of your project to format all the labels as you want:

              const var labels = Content.getAllComponents("lbl");
              
              for (l in labels)
              	l.set("editable", false);
              

              Editing the HISE source code is a quicker, more permanent recommendation.

              Sonic Architect && Software Mercenary

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

              15

              Online

              2.2k

              Users

              13.6k

              Topics

              118.1k

              Posts