在vb.net的ListView中获取列单击事件方法 [英] get column click event method in listview of vb.net

查看:620
本文介绍了在vb.net的ListView中获取列单击事件方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,我们只需要在vb.net中单击一个控件即可获得其
点击事件方法.然后,我们可以在此方法内添加代码.但是,当
我试图获取列单击事件方法,但无法获取.

In general, we just click a control in vb.net then we can get its
click event method. Then we can add codes inside this method. However, when
I tried to get a column click event method, I could not get that.

推荐答案

juncatou写道:
juncatou wrote:

我试图获取列clcik事件方法,但无法获取

I tried to get a column clcik event method, I could not get that


您尝试过的内容请显示您的努力,以便我们可以证明您的代码出了什么问题,

ColumnClickEvent在用户单击ListView控件中项目的详细信息视图中的列标题时发生
浏览此链接[ListView.ColumnClick事件] [ ^ ]到知道有关Listview.ColumnClick事件的详细信息.


what you have tried please show your effort so we can justify what is going wrong in your code whatever,

The ColumnClickEvent Occurs when the user clicks a column header in a details view of the items in a ListView control
Navigate this Link[ListView.ColumnClick Event][^] to know about Listview.ColumnClick event in details.


我就像您所说的那样:单​​击listview控件的列标题(在listview属性中,视图处于详细模式).我的Form1代码页中没有lstView1_ColumnClcik(........)事件方法.例如,当我尝试在TextBox控件中单击该控件时,il将创建clcik事件方法.我需要激活或启用它们的列表视图有一些特殊属性?
I just did as you said: clicked on a column header (view is in detailed mode in listview properties) of the listview control. No lstView1_ColumnClcik(........) event method occured in my Form1 code page. When I tried for example, in TextBox control, just a click on this control, il creates a clcik event method. There are some special properties of the listview I need to activate or enable them ?


为响应您的回答.

在设计器中,选择列表视图,打开属性页,在顶部会看到一些选项卡,其中一个带有闪电符号,请单击它.现在,您正在查看ListView的公共事件列表.在该列表中搜索,直到找到所需的列表,然后双击它.事件处理程序的模板将插入到您的代码中,就像您双击Form时,将添加Form_Load模板一样.
In response to your Answer.

In the designer, select your list view, bring up the properties page, at the top you will see some tabs, one of them has a lightning symbol, click it. You are now looking at a list of the public events for the ListView. Search in that list until you find the one you want and double-click it. The template for the event handler will be inserted in your code just like when you double-click on the Form you get the Form_Load template added.


这篇关于在vb.net的ListView中获取列单击事件方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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