0

I'm using a layout panel with some layers. One of the layers is quite simple but I want it to have a float: right on the element. But this is actually not working because subwidgets are styled with style="postition: absolute; left: 0px; ..." which overrides the styling and so the subpanels/widgets will always be placed on the left. Any workaround for this?

4

1 回答 1

1

将元素添加到布局容器后,您是否尝试过 setWidgetHorizo​​ntalPosition

如果上述方法不起作用并且您想正确使用浮动,也许您可​​以使用带有 FlowPanel 的非布局系统。否则,您将不得不修复组件的位置和宽度/高度,但您可能会失去响应式设计。

最后一招:如果你真的需要改变绝对风格。在您的组件中执行类似的操作(在您的组件添加到 dom 后执行此操作)

this.getElement().getParent().getStyle().set.....

您可以重置您想要的任何属性,但这可能会破坏您的布局

于 2014-02-03T20:48:33.920 回答