gwt - GWTcelltable 滚动条
问题描述
我有一个带有 cellTable 的表格,请参见下面的代码:
<?xml version="1.0" encoding="UTF-8"?>
<!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" xmlns:c="urn:import:com.google.gwt.user.cellview.client"
xmlns:b="urn:import:com.bv.partenaire.graphique.client.ui.button">
<ui:with field='msg' type="com.bv.partenaire.web.client.resources.Messages" />
<ui:style>
.important {
font-weight: bold;
}
</ui:style>
<g:HTMLPanel>
<div class="modelBandeau">
<div class="divGauche">
<div class="testClass" style="background-color: green;">
<g:Label styleName="recherche">
<ui:text from="{msg.rechercher}" />
</g:Label>
</div>
<div style="margin-left:10px;margin-top: 1px;">
<g:TextBox ui:field="rechercheBox" />
</div>
</div>
</div>
<table cellspacing='0' cellpadding='0' style='width:100%'>
<tr>
<td valign='top'>
<c:CellTable ui:field="valideursTable" styleName="cellTable"/>
</td>
</tr>
<tr>
<td align='center'>
<c:SimplePager pageSize="10" ui:field="pager" />
</td>
</tr>
</table>
</g:HTMLPanel>
</ui:UiBinder>
代码工作正常,我的问题是当我的列中有长数据时没有水平滚动条
我尝试添加 <g:ScroolPanel> 和 <g:VerticalPanel> 仍然不起作用?
尝试添加一些CSS
table{
display: block;overflow-x: auto;white-space: nowrap;
}
我不使用 DataGrid
有任何想法吗 ?
解决方案
它只适用于 CSS,只需添加上面的代码和固定宽度(950px),滚动条就会出现
推荐阅读
- javascript - 为什么我的 jQuery Ajax json 数组数据会重复?
- python - 如何修复“py”不被识别为内部或外部命令、可运行程序或批处理文件
- ios - 如何在表格视图中实现从 firestore 搜索 UISearchBar?
- jquery - 在多个 AJAX 请求中使用 async: true
- javascript - FabricJS:对象控件在共同选择之前不起作用
- python - 无法将元素附加到 PySpark 中的列表
- reactjs - Redux 和 redux saga 从存储中删除值
- javascript - html中的正则表达式创建相同的模式
- django - ProgrammingError 列 Users_student.school 在 django 中不存在
- javascript - 如何循环嵌套对象和数组Javascript?