现在的位置: 首页 > 综合 > 正文

操作树形节点

2011年12月08日 ⁄ 综合 ⁄ 共 306字 ⁄ 字号 评论关闭
  TNodeType = (ntBM, ntXLD, ntKH, ntZD, ntCLD);
  TRtuNodeData = record
    NodeType: TNodeType;
    id: integer; //数据库的索引,不同的节点类型对应不同的表和字段
    RtuAddr: string[8];
  end;
......
var
  sCommID: string;
  data: ^TRtuNodeData;
begin
  data := TTreeView.Selected.Data;
  if data = nil then exit;
  if data.NodeType <> ntZD then exit;
  sCommId := data.RtuAddr;
end;

抱歉!评论已关闭.