当前位置:编程学习 > Delphi >>

实现VirtualTree的Editor的功能定制之setBounds

//做的改动

1.//function TStringEditLink.PrepareEdit(Tree: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex): Boolean;

    //you can set the value diaplaying int the editor here

    Text :=FTree.GetText(Node,Column);

    FirstMatch :=Pos ((,Text );

    if FirstMatch <>0 then
       LastMatch :=Pos (),Text )
    else
    begin
      FirstMatch :=Pos (",Text );
      if FirstMatch <>0 then
         LastMatch :=Pos (;,Text )-1;
    end;

   if LastMatch <>0 then
      Text :=Copy (Text,FirstMatch ,LastMatch -firstmatch+1);


2.//procedure TStringEditLink.SetBounds(R: TRect);

  //to change the left of bound

       text:= FTree.GetText(FNode,0);

补充:软件开发 , Delphi ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,