HISE Logo Forum
    • Categories
    • Register
    • Login

    Viewport Styling Methods?

    Scheduled Pinned Locked Moved General Questions
    5 Posts 2 Posters 97 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.
    • CasmatC
      Casmat
      last edited by Casmat

      Hey!

      I'm wondering what the best way to style a viewport is nowadays. I saw CSS functionality, but I don't think I'll be able to utilize CSS until there's a way to draw objects within components. I know you can put a panel inside a viewport and style it that way, is that still the way to go for customization, or are there dedicated LAF functions implemented. I found some drawtable methods that seem to go with the viewport, but I cant get them to do anything that styles a viewport.

      Thanks!

      i make music

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

        @Casmat I use a panel, and laf for the scrollbar. I think the laf functions for viewports are for when it's in table mode (but I could be wrong).

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

        CasmatC 2 Replies Last reply Reply Quote 0
        • CasmatC
          Casmat @d.healey
          last edited by

          @d-healey Ah ok! Thanks a lot!

          i make music

          1 Reply Last reply Reply Quote 0
          • CasmatC
            Casmat @d.healey
            last edited by Casmat

            @d-healey One question, should you use just one panel in the viewport or generate a new panel for each list item you have in the viewport?

            In my case, I'm working on a custom preset browser and will have multiple laf elements inside each viewport plus mouse callbacks for hover and click, what do you recommend?

            Option 1: Use one panel and using row height + for loop, you draw elements within that panel. However, I'd need to make this parent panel on All Callbacks to get mouse position if I want to have a hover/click effect for each list item.

            Option 2: Generate a panel per list item and enable Click + Hover callbacks and do hover/click effects like a normal panel.

            Thanks!

            i make music

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

              @Casmat said in Viewport Styling Methods?:

              One question, should you use just one panel in the viewport or generate a new panel for each list item you have in the viewport?

              If it's a simple list then one panel.

              If each item in the list needs an interactive element then use child panels.

              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

              12

              Online

              1.7k

              Users

              11.8k

              Topics

              102.6k

              Posts