如何在没有鼠标双击的情况下制作活动? [英] How to make an event without mouse double click?

查看:77
本文介绍了如何在没有鼠标双击的情况下制作活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在没有鼠标双击的情况下制作活动吗?因为我做了一个菜单,有很多项目,我不能看到他们都按下它们:/?

任何解决方案,请?



thanx

can i make an event without mouse double click? cause i made a menu that has a lot of items and i cant see them all to press on them :/ ?
any solution please ?

thanx

推荐答案

没有鼠标双击,你可以做很多事情的事件 - 这只是大多数控件支持的众多事件之一。



但是......嗯......如果你有这么多的菜单项,你看不到它们都按下它们,那么你是怎么回事(或者你的用户) )要知道你要选择哪一个?这有点像GUI的整个想法 - 你应该能够看到它。

也许您需要做的是重新考虑您的设计:可能将菜单分组到相关的子菜单,甚至是属性对话框页面上的标签页都是个好主意?





[edit]

我刚刚解决了你的意思!

这不是您遇到问题的正在运行的应用程序,它将事件附加到Visual Studio中的菜单项,当它们位于表单边框之外时,您无法在设计器中看到它们以双击它们!



现在有道理......

好​​的,是的,你可以。

每个菜单项都有一个名字:通常它开始生活作为WhatEverYouTypedTooStripMenuItem,所以如果您的项目是选择,那么它将被称为SelectToolStripMenuItem。如果查看属性窗格,顶部会显示一个下拉列表,其中列出了表单中的所有控件。如果您单击要为其设置事件的项目,则其属性将显示在窗格中。



选择事件页面,其中包含属性窗格按钮看起来像一个闪电,然后双击点击事件 - 这将为你创建并连接事件处理程序。



它可能仍然是一个好主意考虑缩小菜单的大小! :笑:

[/ edit]
You can have events that do a lot of things without mouse double click - it is just one of many that most controls support.

But...um...if you have so many menu items that you can't see them all to press on them, then how the heck are you (or your users) going to know which one you are about to select? That is kinda the whole idea of a GUI - you should be able to see it.
Perhaps what you need to do is rethink your design: perhaps grouping menus into related sub menus, or even tab pages on a "Properties" dialog page would be a good idea?


[edit]
I just worked out what you meant!
It's not the running app you have problems with, it's attaching the events to the menu items in Visual Studio when they are outside the form borders and you can't see them in the designer to double click them!

Makes sense now...
OK, yes you can.
Each menu item has a name: normally it starts life as "WhatEverYouTypedTooStripMenuItem", so if your item was "Select" then it would be called "SelectToolStripMenuItem". If you look at the properties pane there is a drop down at the top, which lists all the controls in your Form. If you click on the item you want to set an event for, it's properties will appear in the pane.

Select the "Events" page with the Property Pane button that looks like a lightning bolt, and double click the "Click" Event - that will create and hook up the event handler for you.

It's probably still a good idea to consider shrinking the size of your menu though! :laugh:
[/edit]


你永远不应该有一个菜单或子菜单,其中显示的项目太多曾经,它会让用户疯狂。有许多不同的方法。



例如,我打赌所有这些项目的功能都非常相似。如果是这种情况,您应该只有一个元素,它只对某些UI元素(控件)中的某些选定项应用某些操作。什么元素/控制?几乎任何你可能决定设计的东西。它可以是包含所选项目的列表框,因此您的菜单项可以应用于此选定列表项中包含的某些数据。它可以是具有所选卖出或行的网格视图,带有所选项目的列表视图,选项卡控件上的选定选项卡,以及更多。



这只是一个例。我不知道菜单项操作和设计目标的真正目的。我只是说有很多设计不会让用户发疯。如果你告诉我更多关于这个目标的话,我可能会建议一些特定的设计理念。这一切都取决于你想要达到的目标。



-SA
You should never have a menu or a sub-menu with too many items shown at once, it would drive the user crazy. There are many, many different approaches.

For example, I bet all those items are very similar in functionality. If this is the case, you should have only one element which only applies some action to some selected item in some UI element (control). What element/control? Nearly anything you may decide to design. It could be a list box with selected item, so your menu item could be applied to some data contained in this selected list item. It could be grid view with selected sell or row, a list view with selected items, selected tab on a tab control, and a lot more.

That was just an example. I don't know the real purpose of your menu item action and your design goals. I just say there are a lot of designs which won't drive the user crazy. If you tell me more about that goal, I will probably be able to suggest some particular design idea. It all depends on what do you want to achieve.

—SA


这篇关于如何在没有鼠标双击的情况下制作活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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