树状图选择更改在delphi中的事件 [英] Treeview selection changed event in delphi

查看:152
本文介绍了树状图选择更改在delphi中的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在树视图控件中选择树视图项目,则将显示并更改包含每个表单的每个选定项目的表单.

If i select the treeview item in the treeview control the form will displayed and changed in each selected item contains a form

推荐答案

您只需要处理onclick TreeView节点的事件,然后在代码背后,相应地更改现有表单的内容,或从那里打开一个新的表单/对话框.
You simply need to handle the onclick event for the TreeView nodes and then in the code-behind either change the existing form contents appropriately, or open a new form/dialog from there.


您的意思是您想要显示某些信息TForm内的TTreeView控件中是否有任何选定的项目?

您可以通过处理TTreeView.OnClick事件来实现.

如果将TTreeView.MultiSelect设置为False,则属性TTreeView.Selected将存储一个用户选择的内容.

如果将TTreeView.MultiSelect设置为True,请使用属性TTreeView.Selections.

然后,您可以从选定"或选定内容"中获取信息以更新表单.
You mean you want to show certain information for any selected item(s) in the TTreeView control inside a TForm?

You can do this by handling TTreeView.OnClick event.

If you set TTreeView.MultiSelect False, property TTreeView.Selected stores the one user selects.

If you set TTreeView.MultiSelect True, use property TTreeView.Selections.

Then you can take information out of Selected or Selections to update your form.


这篇关于树状图选择更改在delphi中的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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