有谁用过Mabry XMLTreeview?有些问题想请教编辑方面的问题 ( 积分: 50 )

G

GISc

Unregistered / Unconfirmed
GUEST, unregistred user!
有谁用过Mabry XMLTreeview?有些问题想请教编辑方面的问题
事件procedure XMLTreeX1AfterCellEdit(ASender: TObject; Cell: Integer;
const NewCaption: WideString);
当设置树的可编辑状态为True时,可以保存编辑后的cell名称。

在VB中用如下代码实现
Dim items As XMLTreeXItems(全局变量)

Private Sub Form_Load()
Dim s As New DOMDocument

s.Load "E:/metadata.xml"
XMLTreeX1.LoadXML s

XMLTreeX1.AllowEdit = True

Set items = XMLTreeX1.items
End Sub

Private Sub XMLTreeX1_AfterCellEdit(ByVal Cell As XMLTreeLibCtl.HXMLTREECELL, ByVal NewCaption As String)
items.CaptionCell(0, Cell) = NewCaption
End Sub

但是在delphi中我用了同样的过程却不能实现编辑呢,在button click事件中items.CaptionCell(0, Cell) 是可以实现的,我觉得好像是XMLTreeX1_AfterCellEdit事件没有被触发。这是怎么回事?
 
有谁用过Mabry XMLTreeview?有些问题想请教编辑方面的问题
事件procedure XMLTreeX1AfterCellEdit(ASender: TObject; Cell: Integer;
const NewCaption: WideString);
当设置树的可编辑状态为True时,可以保存编辑后的cell名称。

在VB中用如下代码实现
Dim items As XMLTreeXItems(全局变量)

Private Sub Form_Load()
Dim s As New DOMDocument

s.Load "E:/metadata.xml"
XMLTreeX1.LoadXML s

XMLTreeX1.AllowEdit = True

Set items = XMLTreeX1.items
End Sub

Private Sub XMLTreeX1_AfterCellEdit(ByVal Cell As XMLTreeLibCtl.HXMLTREECELL, ByVal NewCaption As String)
items.CaptionCell(0, Cell) = NewCaption
End Sub

但是在delphi中我用了同样的过程却不能实现编辑呢,在button click事件中items.CaptionCell(0, Cell) 是可以实现的,我觉得好像是XMLTreeX1_AfterCellEdit事件没有被触发。这是怎么回事?
 
顶部