2013-12-13 25 views
0

我正在爲我的應用程序使用gwt UI綁定並嘗試創建搜索框,但我不太確定如何增加列表框中文本的大小。如何使用GWT增加ListBox的文本大小

<g:FlowPanel styleName="{rscb.style.textAlignCenter}">  
    <g:InlineLabel ui:field="searchLabel" text="{labels.searchFor}" > </g:InlineLabel> 
    <g:InlineLabel text="*" addStyleNames="{rscb.style.redStar}"></g:InlineLabel> 
    <g:ListBox ui:field="searchListBox" styleName="{sccb.style.customerListText}" > 
    </g:ListBox> 
</g:FlowPanel> 
    <g:SimplePanel addStyleNames="{rscb.style.textAlignCenter}"> 
    <g:Button ui:field="searchButton" text="{clabels.search}" styleName="{sccb.style.customerListText}"/> 
    </g:SimplePanel> 

什麼我得到的是 enter image description here

我所期待的 enter image description here

任何建議,將不勝感激。

回答

0

嘗試使用CSS,這樣的事,(你可能需要增加一個孩子股利或也許這將直接工作)

<g:FlowPanel styleName="{rscb.style.textAlignCenter}">  
    <g:InlineLabel ui:field="searchLabel" text="{labels.searchFor}" > </g:InlineLabel> 
    <g:InlineLabel text="*" addStyleNames="{rscb.style.redStar}"></g:InlineLabel> 
<g:ListBox ui:field="searchListBox" addStyleNames="myCss" > 
</g:ListBox> 
</g:FlowPanel> 
    <g:SimplePanel addStyleNames="{rscb.style.textAlignCenter}"> 
    <g:Button ui:field="searchButton" text="{clabels.search}" styleName="{sccb.style.customerListText}"/> 
    </g:SimplePanel> 

到應用程序的CSS添加此類

.myCss 
{ 
    font-size : 2em; 
} 
相關問題