日期:2014-05-18  浏览次数:20875 次

控件摆放问题
我想把一个textbox放在DropDownList的上面,覆盖住DropDownList下拉按钮前面的部分,应该如何设置呢~?

帮顶有分,另开帖给分

------解决方案--------------------
up
------解决方案--------------------
顶一下。不知楼主的目的是想干嘛呢。
呵呵。不过应该也可以用CSS来控制。
------解决方案--------------------
帮你顶 用DIV不行???


------解决方案--------------------
设置属性就可以输入了吧?WinForm是这样的,可以设置;
------解决方案--------------------
你是web方式想做成from那种comboBox吧?默认位置可以输入?
------解决方案--------------------
用DIV可以指定DIV的层为最顶端层! 就不会被反遮住
------解决方案--------------------
up
------解决方案--------------------
webform的没有做过,不知道可不可以通过属性设置,Winform里默认的就是可输入的
------解决方案--------------------
可以将WinForm中的ComboBox放到WebForm中。
------解决方案--------------------
覆盖不了!
<style type= "text/css ">

.optsStyle { OVERFLOW-Y: scroll; BORDER-LEFT: #9999cc 1px double; WIDTH: 298px; BORDER-BOTTOM: #9999cc 1px double; POSITION: absolute; z-index:10px; HEIGHT: 80px; BACKGROUND-COLOR: #ffffff }
</style>
<%=GetVenue()%>
<table cellpadding= "0 " cellspacing= "0 " style= "BORDER-RIGHT:#9999cc 1px double; PADDING-RIGHT:2px; BORDER-TOP:#9999cc 1px double; PADDING-BOTTOM:1px; BORDER-LEFT:#9999cc 1px double; PADDING-TOP:1px; BORDER-BOTTOM:#9999cc 1px double ">
<tr>
<td> <input type= "text " id= "selput " runat= "server " style= "BORDER-RIGHT:#9999cc; BORDER-TOP:#9999cc; FONT-SIZE:12px; BORDER-LEFT:#9999cc; WIDTH:281px; BORDER-BOTTOM:#9999cc "
value= " < enter new venue or select approved one > " onfocus= "this.select() "> </td>
<td> <img src= "file/sel1.bmp " width= "15 " height= "15 " border= "0 " onmousedown= "if(opts.style.display== ' '){opts.style.display= 'none ';}else{opts.style.display= ' '} "> </td>
</tr>
</table>
<div id= "opts " class= "optsStyle " style= "DISPLAY:none; "> </div>
public string GetVenue()
{
string vs = " ";

DataTable dtv = OperDB.ExcuSql( "select distinct venue from sell where isok=1 and user_id= "+Session[ "userID "].ToString());
for(int i=0;i <dtv.Rows.Count;i++)
{
vs += "\t\t\tdata[ "+i+ "] = \ " "+dtv.Rows[i][0].ToString()+ "\ ";\n ";
}
string script = " <script type=\ "text/javascript\ "> \n\t\tfunction fillOption(){\n\t\t\tvar data = new Array(1);\n ";
script += vs + "\t\t\tvar table = ' <table width=280 cellpadding=2 cellspacing=0 style=\ "font-size:12px; background-color:#ffffff\ "> ';\n ";
script += "\t\t\tfor(i=0;i <data.length;i++){\n ";
script += "\t\t\t\ttable += ' <tr onmouseover=\ "this.style.backgroundColor=\\ '#6699ff\\ ';this.style.color=\\ '#ffffff\\ ';\ " onmouseout=\ "this.style.backgroundColor=\\ '#ffffff\\ ';this.style.color=\\ '#000000\\ ';\ "> ';\n ";