Question

I'm working on a GWT project where the font-sizes need to be set dynamically. I'm attempting to use

myFlexTable.getElement().getStyle().setProperty("fontSize", Integer.toString(font_size) + "px");

to set the font-size of the text in myFlexTable. Unfortunately, this setting is being overwritten by a 13px font-size that I don't know how to fix. When using the above code on a GWT label or input, it correctly sets the font-size. When searching for a solution I've only been able to find solutions which are edits of the static CSS. Any suggestions as to how I might fix this? Thank you much!

Was it helpful?

Solution

The problem may also simply be that you're setting the font size of the entire table, and not individual elements. Try checking the classes and CSS of your flextable in production mode via Inspect element of Firebug or such.

UPDATE: Edited post to contain only the correct solution.

OTHER TIPS

You can apply new css at run time for flextable.

myflexTable.removeStyle("old_style");
myflexTable.setStyle("new_style");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top