gpt4 book ai didi

gwt - 如何在 GWT UIBinder 模板中重新设置 SplitLayoutPanel 的拖动器样式

转载 作者:行者123 更新时间:2023-12-02 00:30:54 26 4
gpt4 key购买 nike

谁能告诉我如何在 SplitLayoutPanel 的 UIBinder 模板中更改拖动器的样式。

这是我的 MainMenu.ui.xml:

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:style src="Resources/GlobalStyles.css" />

<g:SplitLayoutPanel width="100%" height="100%" styleName='{style.splitLayoutPanel}'>
<g:north size="100">
<g:HTMLPanel/>
</g:north>
<g:west size="250">
<g:HTMLPanel/>
</g:west>
<g:center>
<g:HTMLPanel/>
</g:center>
<g:south size="50">
<g:HTMLPanel
styleName='{style.footerPanel}'>
<div>
<a href="#">Contact us</a>
<a href="#">Privacy</a>
<a href="#">About</a>
</div>
</g:HTMLPanel>
</g:south>
</g:SplitLayoutPanel>

</ui:UiBinder>

Resources/GlobalStyles.css 看起来像这样:

body,table {
font-size: small;
}

body {
font-family: Helvetica, Arial, sans-serif;
color: #000;
background: #red;
}

.splitLayoutPanel {
.gwt-SplitLayoutPanel-HDragger {
background:#d0e4f6;
cursor: col-resize;
}

.gwt-SplitLayoutPanel-VDragger {
background: #d0e4f6;
cursor: row-resize;
}

}

.footerPanel {
margin-left: 11px;
padding: 10px;
border-top: 2px solid #5693d6;
text-align: right;
}

这是怎么回事?我的拖动器不可见,也没有 cursus 变化。

最佳答案

我认为 GWT 不喜欢嵌套。因此,按如下方式重写 css 应该可以正常工作:

.splitLayoutPanel .gwt-SplitLayoutPanel-HDragger { 
background:#d0e4f6;
cursor: col-resize;
}
.splitLayoutPanel .gwt-SplitLayoutPanel-VDragger {
background: #d0e4f6;
cursor: row-resize;
}

GWT 也可能会提示 .gwt- 样式,在这种情况下,您的 css 中的以下行:

@external .gwt-SplitLayoutPanel-HDragger;
@external .gwt-SplitLayoutPanel-VDragger;

关于gwt - 如何在 GWT UIBinder 模板中重新设置 SplitLayoutPanel 的拖动器样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6845291/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com