首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

winform 隐藏Panel 显示多个button 当此中button离开时 panel显示

2014-01-12 
winform隐藏Panel显示多个button 当其中button离开时 panel显示winform隐藏Panel显示多个button 当其中but

winform 隐藏Panel 显示多个button 当其中button离开时 panel显示
winform  隐藏Panel   显示多个button 当其中button离开时 panel显示winform  隐藏Panel   显示多个button 当此中button离开时 panel显示

最上面是一个PictureBox当鼠标放到上面时出现隐藏的panel1,panel1上面有多个按钮,
当鼠标移到第一个按钮b上时,panel正常显示,当移到c上时,panel也显示,当移到空白的地方是panel不显示
主要是想知道,如何判断从b移到c 还是从b-移到空白。菜鸟请教,分不多写写,望告知。谢谢!
看错题。。。
那就用MouseEnter MouseLeave事件,拉一个Timer控件定义1000毫秒指行一次 就可以了,让鼠标有个缓冲的过程。

timer1_Tick(object sender,EventArts)
{
  panel.Visible=ShowPanel;


bool ShowPanel=false;

b_MouseEnter(xxx,xxx)
{
   ShowPanel=true;
}

b_MouseLeave(xxx,xxx)
{
  ShowPanel=false;

}

c_MouseEnter(xxx,xxx)
{
  ShowPanel=true;
}

b_MouseLeave(xxx,xxx)
{
  ShowPanel=false;
}
[解决办法]
何判断从b移到c 还是从b-移到空白   b-C 这里可以做标记, b-空白 ,空白指的是窗体吧?如果是窗体只能在窗体上做标记,好好利用这两个事件就行winform  隐藏Panel   显示多个button 当此中button离开时 panel显示
[解决办法]


对就是这两个事件。。。。

热点排行