HISE Logo Forum
    • Categories
    • Register
    • Login

    Disable an option in a combobox

    Scheduled Pinned Locked Moved General Questions
    14 Posts 5 Posters 487 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.
    • Matt_SFM
      Matt_SF @hisefilo
      last edited by

      @hisefilo I wondered the same recently but also found nothing in the docs. I don't know if it's possible.
      For my project I'm using several cBox with the same choices. I ended up using a "if user selects a cBox value which is already used by another one, change the value of the other one" system

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        does this work?

        if (value == optionIDidntActuallyWant)
            return;
        else
            doNormalCBThings();
        
        Matt_SFM 1 Reply Last reply Reply Quote 2
        • Matt_SFM
          Matt_SF @A Former User
          last edited by

          @iamlamprey this should work for that purpose but there's no laf function to grey the value out AFAIK

          Develop branch
          Win10 & VS17 / Ventura & Xcode 14. 3

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

            @Matt_SF You can draw individual items in a combo box, so just draw it with a grey colour.

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

            Matt_SFM 1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by A Former User

              yeh im trying to write up a quick snippet but i can't remember how to push the combobox values into an array... brain too sleepy

              Edit: there actually is one issue with using return; the value of the ComboBox still changes, despite it ignoring whatever code you put after the return call.

              You might have to use a panel if you depend on the value of the combobox not changing, unless there's some sneaky way to ignore the value update before the actual control callback, which would kill 2 birds with 1 function

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @A Former User
                last edited by

                @iamlamprey local items = ComboBox.get("items).split("\n");

                the value of the ComboBox still changes,

                So change it back ;)

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

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

                  HiseSnippet 1002.3ocsV01aaaCDlxIpaR6EzBre.B9Sx.dF1MIsCqHnMwIdvXIoFyYA6aELRms4BEo.EkSLJx+49OX6HkrjxhQZqAl+PBOd2C4ycG4C0DkLBxxjJhi2kqRAhy26NckPuX3BJSPFeBw4GcOmloAUPwTGuJklkAwDGmc9MyDNd6Rr+9zaOlxohHndJB4JIKBNikvz0yN4c+NiyGQigKYIMhd+2MNRJFJ4xbjO631mjRitgNGtfZBqkKw4YmFyzR0TMUCYXLGKiWMcg7VQQ7WwxXWyAiw.xTbgJllLbAiGOYctlQHN6NoNy2oHy+I2yYwrp4qq.O25HnFQyZfSqmhRC9JnjSCJsaAkdg6zHEKUW6wvmuycr.aHynXotIUJhkzJYG2gRLBgtWB8FXjBMpPD9p986Ff+oya78Uv7.N1cuhxyg2XMiYYTjuwAGFzdu1XLXKISGDIStVdr7tynyPOqW9HEfY8YxHJ+Lo7liDwi.fG1wBqBPObcYliPixEQZlTD1NVQuchLMO8bPjOVCIs6FLas24cCjW+2c7+nu27dYft3DQXw+x5cKSu3Hd5BZ8LKXZvBpmFtSGb3g0owaC526ffeMXPu9cPdgqnYuOhylKf3KwnCWCqXAnXJ0MnMGloaiweuIWJqAKo3kfxzZPipvbCESRkBzHrcUDF3UFl73Q0oF0Hy1vDbl.ppCAl6BkvMakRZQTrOcQ1f8LaQhMKn1ggMlBpM05zrTzw2CC1qNRjR1FeX0Q.SAxSA5bk.GcummuGvyfBfHGxjbnWphg44xp3qPikjkEGjrPuGSoOaIpn+ZStgTN+Z7Be3iyabeZTUtPpg2KBs4t+89A+WWylsQekqEGTazsQKR8T.CE4IWCplUdSf3k0Gp.7ruLEfnhRSi.khwBl98oPo8HIO1by1L9w5EjxZKN5OGeBUSMRHkygwkBJMyPGmSfknFbgfhm6IP1MZYpM1xFBw4azVuOuTtYc4mvhMpMUcCxcDGWm43NtxLXDNHgZmyEGh2ASxLwOv+k964uu+AjL5RXrXhBvtrQgh7XINTbUFmyo5Gp3ZdZozA1DdfLmQJSjwzqZ9zyWgLb+mTF9KkhuvcBSGsXybr0F3H1d9+fikOd8CtmNaFDoqI3tti9qs8kpOy1+GxbMSL+bpVwLs+KxSlhBwQ.t6BApXXNRzxbDsvtuw1TAlBhXqw+f+JcNvX6T5bvZm3AqHk7CQEW8LOO9s1YPNIreMfG9YIncv.h85Hhyseu9jD7k5ODEYR+ed.grYLubKvr2VfY+s.yAaAlWsEXd8Vf4WdRLlOR5nbsLo35.NwjSs5RNNmJru.Yk.9WvLHXeU
                  

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

                  1 Reply Last reply Reply Quote 1
                  • Matt_SFM
                    Matt_SF @d.healey
                    last edited by

                    @d-healey said in Disable an option in a combobox:

                    @Matt_SF You can draw individual items in a combo box, so just draw it with a grey colour.

                    oh my! Thanks David I have completely overlooked this 👍.
                    Where are you on your "I'm being stupid" tee-shirts idea ? I might require a dozen of them...

                    Develop branch
                    Win10 & VS17 / Ventura & Xcode 14. 3

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

                      @Matt_SF

                      9d82247c-5292-4072-8ce4-c1489e64c144-image.png

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

                      1 Reply Last reply Reply Quote 3
                      • hisefiloH
                        hisefilo @d.healey
                        last edited by

                        @d-healey said in Disable an option in a combobox:

                        So change it back ;)

                        That's all I needed! You rock man!
                        Also I'll need some t-shirts too!! (not a bad idea at all: 400 members * $49,95)

                        LindonL 1 Reply Last reply Reply Quote 1
                        • LindonL
                          Lindon @hisefilo
                          last edited by

                          @hisefilo said in Disable an option in a combobox:

                          @d-healey said in Disable an option in a combobox:

                          So change it back ;)

                          That's all I needed! You rock man!
                          Also I'll need some t-shirts too!! (not a bad idea at all: 400 members * $49,95)

                          @d-healey my lawyers will be in contact with you over the use of my intellectual property..if anybody here is stupid its me....and I will vigorously defend my ownership of stupidity...:beaming_face_with_smiling_eyes:

                          HISE Development for hire.
                          www.channelrobot.com

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

                            @Lindon

                            4895ef76-86a0-4a2b-a6b8-8577a0ae8423-image.png

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

                            LindonL 1 Reply Last reply Reply Quote 1
                            • LindonL
                              Lindon @d.healey
                              last edited by

                              @d-healey said in Disable an option in a combobox:

                              @Lindon

                              4895ef76-86a0-4a2b-a6b8-8577a0ae8423-image.png

                              yeah I think "...2022" is actually a bit narrower than the time frame I've been stupid in....

                              HISE Development for hire.
                              www.channelrobot.com

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

                              23

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              103.2k

                              Posts