Hi everybody,
I’ve recently started developing a webapp using vaadin for an Italian bank, and after solving a couple of issues related to the Reverse Proxy they’re using by digging into vaadin sources (kudos for your great documentation, btw! :D) I just started designing the UI.
I’ve stumbled into a minor problem that I can’t get away with: I have a Panel (with style set with
hPanel.setStyleName(Reindeer.PANEL_LIGHT)
) with a multi-line TextField packed inside a HorizontalLayout, the width of which extends over the width of the page. Hence, I need a horizontal scrollbar.
My problem is that I don’t want the Panel to have a vertical scrollbar on its side, because the TextField must have its own and having two vertical scrollbars side by side is plain ugly.
I tried to set a custom CSS style for the panel (and the horizontal layout), a simple:
.novscroll {
overflow-y: hidden;
overflow-x: auto;
}
and I also tried to win over the inherited reindeer styles by putting this as well:
.v-panel-content.v-panel-content-light.v-panel-content-novscroll {
overflow-y: hidden;
overflow-x: auto;
}
But, while all components have the style I set with the usual
addStyle(“novscroll”)
the inner content of the panel still has this style (I use chrome’s Inspect Element):
<div class="v-panel-content v-panel-content-light v-panel-content-novscroll" style="position: relative; height: 300px; overflow-x: auto; overflow-y: auto; ">
and as you can see the
overflow-y: auto
is still there, listed by chrome as “Style Attribute”, with my style coming second (and thus overridden). If I uncheck the checkbox with
overflow-y: auto
I get exactly what I want.
Internet Explorer 6+ and Firefox display the page correctly, so this is not an urgent issue at all (the bank’s “official” browser is IE), but I’d like to know whether the style can be overridden or a custom component would be required to accomplish what I want.
Thanks!