TreeView能否這樣使用?(10分)

康仔

Unregistered / Unconfirmed
GUEST, unregistred user!
aaaa
|
|--a0001
|--a0002
bb
|
|-b0001
|-b0002
如果做到Select a0001 or Select a0002 時 label1的Caption顯示aaaa
Select b0001 or Select b0002 時 label1的Caption顯示bbbb
 
if TreeView1.Selected.Level = 1 then
Label1.Caption := TreeView1.Selected.Parent.Text;
 
楼上的对呀
不过不要用level来判断好一点
 
謝了,兩位
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部