ASP.NET:如何隐藏ListBox控件垂直滚动条? [英] ASP.NET: How to hide ListBox control vertical scrollbar?
本文介绍了ASP.NET:如何隐藏ListBox控件垂直滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经试过CSS:溢出:汽车。它不工作。任何方法去实现它?
I have tried CSS: overflow: auto. It doesn't work. Any way to achieve it?
我是否需要创建我的自定义控制,因为我已经看到它在ASP.NET论坛?
Do I need to create my custom control as I have seen it on ASP.NET forum?
推荐答案
这为我工作
listBox1.DataSource = ....
listBox1.DataBind();
listBox1.Rows = listBox1.Items.Count + 1;
<div Class="divBorderCSS">
<asp:listbox id="lbPCList" runat="server" DataTextField="Text" DataValueField="Value" selectionmode="Multiple" CssClass="lbCSS">
</asp:listbox>
.listboxCSS
{
font-size: 8pt;
font-family: Arial;
border:0;
overflow:auto;
}
.divBorderCSS
{
border-left-width:thin;
border-right-width: thin;
border-top:thin;
border-bottom: thin;
border-color: #7F9DB9;
border-style:solid;
overflow:auto;
width: 300px;
height: 100px;
POSITION: relative;
}
这篇关于ASP.NET:如何隐藏ListBox控件垂直滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文