Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Autosize listgrid columns with larger font

    Hello everybody,

    First of all thank you for this amazing library. Now let's look into the problem.

    I am using a listgrid where i have increased its font size by overriding the getCellCSSText method. I also make the listgrid autosize each columns width to fit the header and values as well.

    Even though that autofitting works great for the default font size if you increase the font size (which i have done as mentioned above), the bigger font is not taken into account and the autofitting is performed as if the normal font is actually displayed.

    I have googled it and searched in this forum but havent found any way to make the autofitting take into account the larger font. Please any help would be welcome.

    Thanks in advance and have a nice day !

    #2
    When using the "Density" selector in the Showcase you can see that the ListGrid auto-sizes properly with increased font sizes. So there is no inherent issue where font size is ignored.

    To look further, we'd need a minimal, ready-to-run test case demonstrating an issue. As covered in the Debugging topic and FAQ, the best way to produce such a test case is usually to start with a sample from the Showcase and add modifications until you can reproduce your issue.

    Comment


      #3
      Hello Isomorphic,

      I searched for the sample in the showcase but could not find. Would you please link me the sample you are talking about?

      Thanks in advance !

      Comment


        #4
        Hi e.kousou,

        it's in any sample. Next to the skin selector in the top right there is a density SelectItem.

        Best regards
        Blama

        Comment


          #5
          Thanks for the answer @Blama,

          how can i see how this is achieved so i can reproduce it in my project?

          Thanks in advance

          Comment


            #6
            See this blogpost and the two linked Canvas methods.

            Best regards
            Blama

            Comment

            Working...
            X