HISE Logo Forum
    • Categories
    • Register
    • Login

    Removing 2 Digits From First Of A Label

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 171 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.
    • NatanN
      Natan
      last edited by

      Hey Folks
      Hope You All Having A Great Friday

      Can Someone Help Me With the An Label, I Need It To Show The Sample Map Names ( It Works Just Okey ) But I Just Want To Remove 2 Digits From The Very First Of Names?

      Here Is The Line

      Label.set("text",MapNamesArray[activeIndex][value]);
      Label.changed();
      

      Thanks For Advices

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Natan
        last edited by

        @Natan String.substring(int startIndex, int endIndex)

        Can't help pressing F5 in the forum...

        NatanN 1 Reply Last reply Reply Quote 2
        • NatanN
          Natan @ustk
          last edited by

          @ustk Thank You Sir, Let Me Try It :)

          1 Reply Last reply Reply Quote 0
          • NatanN
            Natan
            last edited by Natan

            @ustk Yep :) Done

                if (value)
                {
                    local items = component.get("items").split("\n");
                    local t = items[value];
                    
                    //  Without submenu name
                    local t2 = t.substring(t.indexOf(":") + 5, t.length);
                    Label.set("text", t2);
                    Console.print("Selected Item ID: " + value);
                }
                Label.changed();
            
            1 Reply Last reply Reply Quote 2
            • First post
              Last post

            58

            Online

            1.7k

            Users

            11.7k

            Topics

            101.8k

            Posts