Announcement

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

    Dynamic font sizes in ListGridField?

    My application has a requirement that users be able to specify the font-size (in %) of my ListGrid's column contents. I have a dialog that allows them to select the font-size from a dropdown, which I then save along with other preferences and apply to the ListGrid.

    Unfortunately, it appears that overriding getCellCSSText() is insufficient, because this method applies cssText to the <td> element of a cell, and not to its child <div>, which does not inherit font-size attributes.

    It's also not enough to set the base style of a cell/column, unless I want to configure a full set of CSS rules for every single possible combination of font-size choices!

    What other options do I have? Is there something I can override to access the CSS text of the <div> that *actually* contains the cell contents?

    Thanks!

    #2
    dynamically setting CSS styles

    I have the same question. Is it possible to dynamically set CSS rule without referring to fixed rules from a CSS file?

    Comment


      #3
      In the scenario the user described above, getCellCSSText() is indeed sufficient. A <div> does not prevent font-size from being inherited in CSS, only a <table> would do that, and there is no table inside a normal ListGrid cell.

      Comment

      Working...
      X