-1
我真的被困在重新設計gwt
的SplitLayoutPanel
拖動器。我主要關心的是改變它們的顏色。 我已經試過這個解決方案:Solution但我無法讓它工作。 我使用GWT 2.6
作爲Eclipse Plugin與UIBinder
。如何重新設置GWT UIBinder模板中的SplitLayoutPanel的拖動器#2
我真的被困在重新設計gwt
的SplitLayoutPanel
拖動器。我主要關心的是改變它們的顏色。 我已經試過這個解決方案:Solution但我無法讓它工作。 我使用GWT 2.6
作爲Eclipse Plugin與UIBinder
。如何重新設置GWT UIBinder模板中的SplitLayoutPanel的拖動器#2
經過幾個小時的搜索和嘗試,我終於找到了答案(這當然與提到的非常相似)。 我忘記了
.gwt-SplitLayoutPanel {}
添加到CSS。
這裏是我的代碼剪斷:
<!DOCTYPE ui:UiBinder SYSTEM 'http://dl.google.com/gwt/DTD/xhtml.ent'>
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
<ui:style>
@external .gwt-SplitLayoutPanel-HDragger;
@external .gwt-SplitLayoutPanel-VDragger;
.menuBar {
font-size: 40px;
font-color:red;
font-weight: bold;
background-color: black;
}
.gwt-SplitLayoutPanel {
}
.gwt-SplitLayoutPanel-VDragger {
background: #228899 url(img/Hdragger.png) center center no-repeat;
cursor: row-resize;
}
.gwt-SplitLayoutPanel-HDragger {
background: #228899 url(img/Vdragger.png) center center no-repeat;
cursor: col-resize;
}
</ui:style>
<g:DockLayoutPanel unit="EM">
<g:north size="3">
<!-- ...some Widget-->
</g:north>
<g:center>
<g:SplitLayoutPanel styleName='{style.gwt-SplitLayoutPanel}' ui:field="splitLayoutPanel">
<g:west size="270">
<!-- ...some Widget-->
</g:west>
...
不要忘了下面兩行,沒有這些它dosnt工作!
@external .gwt-SplitLayoutPanel-HDragger;
@external .gwt-SplitLayoutPanel-VDragger;
下面部分是顯示拖動器,它是可選的:
url(img/Vdragger.png) center center no-repeat;