如何在另一个面板上显示面板 [英] How to show a panel over another panel

查看:89
本文介绍了如何在另一个面板上显示面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

面板pnlOne已经在屏幕上。我想在鼠标上显示另一个面板pnlTwo

一个按钮。我能够显示pnlTwo,但是在差异位置。如果我想在pnlOne上显示

它没有显示而只显示pnlOne和pnlTwo的一部分。

是否可以在另一个面板上显示一个面板?



谢谢

A panel pnlOne is already on the screen. I want to display another panel pnlTwo on it on mouse
over of a button. I am able to display the pnlTwo but when at diff location. If I want to display
it on pnlOne it is not getting displayed rather shows only pnlOne and part of pnlTwo.
Is it possible to display one panel over another panel?

Thanks

推荐答案

不确定你有什么问题...



我几乎可以肯定,下面的代码应该完美(或者我错了?):

Not sure what kind of problem do you have...

I'm almost sure, that below code should works perfectly (or am i wrong?):
Panel Panel2= new Panel();
Panel1.Controls.Add(Panel2);





看看这里:如何:添加控件以编程方式到ASP.NET网页 [ ^ ]



Have a look here: How to: Add Controls to an ASP.NET Web Page Programmatically[^]


这篇关于如何在另一个面板上显示面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆