制作透明面板以显示其背后的按钮 [英] making transparent panel to show buttons behind it

查看:61
本文介绍了制作透明面板以显示其背后的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作透明面板以显示它背后的按钮

但我不知道如何将面板的位置发送给它的父母(表格)

当我覆盖InvokePaintBackground()以显示面板背面的按钮



感谢您的帮助

i want to make transparent panel to show buttons behind it
but i don't know how to send panel's location to it's parent(the form)
when i override InvokePaintBackground()to show buttons in back ground of panel

thanks for help

推荐答案

作为简单的步骤,如果你转到Backcolor属性,并将选择器更改为Web,第一个选择是透明。我相信面板的背景颜色将继承其所在组件的颜色
As the simple step, if you go to the Backcolor property, and change the Selector to "Web" the first choice is Transparent. I believe that the backcolor of the panel would inherit the color of the component it is on


Nice CodeProject文章可在反光和半透明玻璃面板 [ ^ ]
Nice CodeProject article is available at A Reflective and Translucent Glass Panel[^]


我找到了解决方案!



覆盖面板的onPaintBackground()事件处理程序,并将其留空

所以每次面板重绘时,它都不会填充任何内容bg所以在对象后面

将出现!



protected override void onPaintBackground(args here)

{

/ / blank

}
i have found the solution!

override onPaintBackground() eventhandler of the panel and leave it blank
so every time the panel redraws it fills nothing in it's bg so behind objects
will appear!

protected override void onPaintBackground("args here")
{
//blank
}


这篇关于制作透明面板以显示其背后的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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