No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    QScrollArea max-height

    Help
    5
    6
    2070
    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.
    • J
      jeffatpf last edited by

      I’d like to set the max-height of a QScrollArea…

      <q-scroll-area style=“max-height: 400px;”>
      …a list of stuff…
      </q-scroll-area>

      …does not work. If “…a list of stuff…” is long the max-height of the scroll area would be 400px, if it’s only a few elements it would be less than 400px, sized to the content appropriately.

      Setting max-height for QInfiniteScroll components works as expected.

      Any ideas/workarounds would be appreciated.

      gvorster 1 Reply Last reply Reply Quote 0
      • J
        jeffatpf last edited by

        Any hints on this?

        1 Reply Last reply Reply Quote 0
        • a47ae
          a47ae last edited by

          Set the property on the inner element not on QScrollArea

          1 Reply Last reply Reply Quote 0
          • gvorster
            gvorster @jeffatpf last edited by

            @jeffatpf said in QScrollArea max-height:

            I’d like to set the max-height of a QScrollArea…

            <q-scroll-area style=“max-height: 400px;”>
            …a list of stuff…
            </q-scroll-area>

            …does not work. If “…a list of stuff…” is long the max-height of the scroll area would be 400px, if it’s only a few elements it would be less than 400px, sized to the content appropriately.

            Setting max-height for QInfiniteScroll components works as expected.

            Any ideas/workarounds would be appreciated.

            Did you ever find a solution to this.
            I have to set a height on the QScrollArea otherwise nothing is visible.

            I have an application with different contents height so I want the height of the scrollarea to be dynamic. I can’t find a way how to do this except to use a fixed height.

            metalsadman 1 Reply Last reply Reply Quote 0
            • metalsadman
              metalsadman @gvorster last edited by

              @gvorster you can calculate height, see css calc

              1 Reply Last reply Reply Quote 0
              • Hawkeye64
                Hawkeye64 last edited by Hawkeye64

                Wrap the QScollArea in a div, that has the max-height
                QScrollArea uses “fit” css class

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