树型目录代码.docVIP

  • 2
  • 0
  • 约4.59千字
  • 约 6页
  • 2018-01-03 发布于河南
  • 举报
树型目录代码

树型目录代码 thisform.label1.Caption =序号:+ltrim(Str(nIndex)) ThisForm.label2.Caption =路径:+ thisform.ctTree2.Path(nIndex) ThisForm.label3.Caption=文本:+thisform.ctTree2.CellText(nindex,ncolumn) ***用到的函数 AddNode 添加 InsertNode 插入 RemoveNode 移除 *** OLE 控制事件 *** 2005-8-15 *** ActiveX Control Event *** WITH this .displayheader = .T. .object.font.name = 宋体 .object.headerfont.name = 宋体 .object.headerfont.bold = .T. .includetime = .F. .headerfilltype = 2 .headerbackcolor = RGB(139,71,38) *!* ******************************************************************** *!* The following will add the columns to the ctTree component * *!* ******************************************************************** nIndex = .addcolumn(第一列,150) .columnsortable(nIndex) = .T. * nIndex = .addcolumn(第二列:Numeric,150) * .columnsortable(nIndex) = .T. * .columndatatype(nIndex) = 2 * nIndex = .addcolumn(第三列:Dates,150) * .columnsortable(nIndex) = .T. * .columndatatype(nIndex) = 3 *!* **************************************************************************************************** *!* The following will add the nodes to the component. Please note that the dates are in the form * *!* of an integer. Each integer represents the number of days since January 1, 1900. Please note the * *!* sample code below illustrating the conversion process: * *!* Variable = STR(DATE() - CTOD(01/01/1900)+2) Two days for the day offset property of the ctDate * *!* nindex = thisform.ctList1.addItem (Variable + ;String) * *!* **************************************************************************************************** .AddNode(新项目;8984;37467, 0, 1) nIndex = .AddNode(化纤长丝部;2436;34728, 0, 1) .NodeExpanded(nIndex) = .F. 展开 .AddNode(生产办;2374;34827, 0, 2) .AddNode(设备动力办;1273;33846, 0, 2) .AddNode(博易短纤;2263;34857, 0, 1) nIndex = .AddNode(织造公司;4563;33484, 0, 1) .NodeExpanded(nIndex) = .

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档