开发者

How do I make somthing visible when the mouse moves across a button?

How do I show a PropertyGrid instead of a context menu, so when the user clicks somewhere else, it will hide (like a context 开发者_高级运维menu)?


You could wire the loss of focus to this action. It's not perfect (not all clicks outside the control will be captured), but it will work every time another control grabs focus.

propertyGrid1.Leave += (object sender, EventArgs e) => { propertyGrid1.Hide(); };

If this is not good enough, you could try wiring the action to other events, such as the form's Click event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜