HISE Logo Forum
    • Categories
    • Register
    • Login

    Change panel transparency?

    Scheduled Pinned Locked Moved General Questions
    8 Posts 5 Posters 436 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.
    • T
      tomekslesicki
      last edited by tomekslesicki

      Is there a way to change the opacity of a panel, including all of it's children? I’m looking for a way to make something semi-transparent on button press.

      Thank you!

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

        @tomekslesicki something like...

        g.setColour(Colours.withAlpha(Colours.Black, 0.2))

        ...in the paint routine would make it black @ 20% opacity

        I've never used child panels but I assume it's a similar process

        Christoph HartC 1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart @A Former User
          last edited by

          No, there's no inbuilt function for setting the opacity of a component, but depending on how your interface looks you can overlay a panel with a semitransparent colour (works only if you're using a uncolored background though

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

            Are all the children also panels? If not then you'd need to style them with LAF.

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

            1 Reply Last reply Reply Quote 0
            • T
              tomekslesicki @Christoph Hart
              last edited by

              @Christoph-Hart I could do this, thanks! I'd just need to figure out how to get blending modes to work because I'm using some textures. However, changing the blending mode makes an image disappear so either it's not working at the moment (?) or I just don't get something super obvious.

              Matt_SFM 1 Reply Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @tomekslesicki
                last edited by

                @tomekslesicki this is for the scripting part :

                HiseSnippet 1049.3ocsV0kaaaDDdoroSjZSPSQN.D5IZ.UAolzj.DDDW8WfZ7ODVNF8oZrhbozBsbWBtKishgeKOlG5QnmfdE5EnWhdC5Mnc1cojnZUbREP0CBb1Y9l4aFNyrLHSDRjRQFxo5YySIHmuzczbtZZ2oXJGMrGx49tGgkJRlm8nNySwRIIB43ryqzG3TcWj42e9xN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Wgx1ZYmBksWnD5qCyDWDZGs02gdWyI.m3lOenJ7cLfr2xYZW2VMaomknWDFpS+uoMBsYLe6Vf4QaAlGuEX9ts.yS1BLOcKv7raEi9Ko99bkHwNN.GDz2ra0woOGCcVltPzeCj60r+O
                

                Regarding how the different blend modes works, just look it up online :)

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

                Christoph HartC T 2 Replies Last reply Reply Quote 2
                • Christoph HartC
                  Christoph Hart @Matt_SF
                  last edited by

                  Why do you need blending layers? Just paint the background image with a low alpha value over the panel

                  1 Reply Last reply Reply Quote 0
                  • T
                    tomekslesicki @Matt_SF
                    last edited by

                    @Matt_SF Thank you! I'm familiar with blending modes but that little snipped helped me to get this to work in Hise :-)

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

                    19

                    Online

                    1.8k

                    Users

                    11.9k

                    Topics

                    103.8k

                    Posts