如果你对TabControl不满意,可以使用DockPanel Suite 一般的第三方的WindowsForms组件都提供了DockPanel的组件,功能方式就像VS IDE中的开发界面,可以进行灵活拖动,停靠以及独立窗口显示。 推荐一款用的比较多的开源组件, dock panel suite,以下是网站地址,提供完整示例和源代码, http://sourceforge.net/projects/dockpanelsuite/
var usingButton="liucheng_lygl"; function changeMap(obj){ document.getElementById(usingButton).style.borderBottomColor="#28af21"; document.getElementById(obj).style.borderBottomColor="#ffffff"; document.getElementById("Image1").src="../imgs/"+obj+".jpg"; usingButton=obj; }
一般的第三方的WindowsForms组件都提供了DockPanel的组件,功能方式就像VS IDE中的开发界面,可以进行灵活拖动,停靠以及独立窗口显示。
推荐一款用的比较多的开源组件,
dock panel suite,以下是网站地址,提供完整示例和源代码,
http://sourceforge.net/projects/dockpanelsuite/
tabPage1.Controls.Add(form1);
请问yjvjom中哪个组建是用来做这个的?
老兄啊,反了吧,form是根了,你还把它放哪里啊,tabcontrol里面有很多的tabpage,每一个tabpage中可以放group或者panel,然后panel上面放显示的内容,textbox啊,label啊,datagridview啊
Form form1=new Form();
form1.TopLevel=false;
this.tabpage1.Controls.Add(form1);
form1.Show();
实现是实现了,但界面比较难看,不能满足我的需求,我希望能达到13楼所述的效果。
请大家帮忙啊。分不够可以加。
在添加一个xtraTabbedMdiManager控件,就自动实现你要的效果了,不用写任何代码。
不是用tabcontrol控件。
先看代码:
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td style="border-bottom:#28af21 1px solid; border-left:#ffffff 1px solid; border-right:#28af21 1px solid; border-top:#ffffff 1px solid;"> </td>
<td id="liucheng_lygl" style="height:24px; border-bottom:#ffffff 1px solid; border-left:#28af21 1px solid; border-right:#28af21 1px solid; border-top:#28af21 1px solid; width:15%; text-align:center; color:#28af21; font-stretch:wider; font-weight: bold; font-size: 9pt; cursor:hand" onclick="changeMap(this.id)">
辅料领用流程</td>
<td id="liucheng_cg" style="height:24px; border-bottom:#28af21 1px solid; border-left:#28af21 1px solid; border-right:#28af21 1px solid; border-top:#28af21 1px solid; width:15%; text-align:center; color:#28af21; font-stretch:wider; font-weight: bold; font-size: 9pt; cursor:hand" onclick="changeMap(this.id)">
辅料采购流程</td>
<td id="liucheng_ndjh" style="height:24px; border-bottom:#28af21 1px solid; border-left:#28af21 1px solid; border-right:#28af21 1px solid; border-top:#28af21 1px solid; width:15%; text-align:center; color:#28af21; font-stretch:wider; font-weight: bold; font-size: 9pt; cursor:hand" onclick="changeMap(this.id)">
年度计划流程</td>
</tr>
<tr>
<td colspan="4" style="border-bottom:#28af21 1px solid; border-left:#28af21 1px solid; border-right:#28af21 1px solid; height:170px; border-top-width: 0px; text-align:center">
<asp:Image ID="Image1" runat="server" ImageUrl="~/imgs/liucheng_lygl.jpg" />
</td>
</tr>
</table>
看到没有?整个table的下面一列被合并成了一个大空间,我这里放的是一幅图像你也可以把它换成一个iframe.
另外还必须在页面加入客户端的js控制代码:<script type="text/javascript">
var usingButton="liucheng_lygl";
function changeMap(obj){
document.getElementById(usingButton).style.borderBottomColor="#28af21";
document.getElementById(obj).style.borderBottomColor="#ffffff";
document.getElementById("Image1").src="../imgs/"+obj+".jpg";
usingButton=obj;
}
</script>这样就可以实现bs情况下的选项卡了。
17楼的方法我马上看看。