ITPUB??ì3
ITPUB论坛 » Web开发 » ASP.NET与AJAX » how to modify DropDownList Size?

新一届的微软MVP评选已经开始,欢迎各位推荐!

标题: how to modify DropDownList Size?
离线 cuckoo1
初级会员



精华贴数 0
个人空间 0
技术积分 24 (46874)
社区积分 0 (121366)
注册日期 2004-6-30
论坛徽章:0
      
      

发表于 2008-6-26 08:50 
how to modify DropDownList Size?

how to modify DropDownList Size?

I want to redefine the size of DropdownList through below way:

        DropDownList1.Size = 5;

But I got below error messages:
Compiler Error Message: CS1061: 'System.Web.UI.WebControls.ListBox' does not contain a definition for 'Size' and no extension method 'Size' accepting a first argument of type 'System.Web.UI.WebControls.ListBox' could be found (are you missing a using directive or an assembly reference?)

Cannot I modify the dropdownlist size? Can anyone tell me other method to do this?

Thanks a lot.


只看该作者    顶部
离线 chenlunpan
Melancholy


精华贴数 3
个人空间 20
技术积分 4788 (282)
社区积分 10132 (156)
注册日期 2006-5-24
论坛徽章:21
2008年新春纪念徽章2008年新春纪念徽章2008年新春纪念徽章2008年新春纪念徽章2008年新春纪念徽章2008年新春纪念徽章
      

发表于 2008-6-26 10:15 
droupdownlist 没有size这个选项吧。可以通过hight和width去设置其大小。


__________________
长期打劫稀有徽章,欢迎接受我的打劫
只看该作者    顶部
离线 cuckoo1
初级会员



精华贴数 0
个人空间 0
技术积分 24 (46874)
社区积分 0 (121366)
注册日期 2004-6-30
论坛徽章:0
      
      

发表于 2008-6-26 10:52 
但是height的单位是px,不好控制. 看来只有在定义listbox时,事先设好Size的值.


只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问