国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

實現VirtualTree的Editor的功能定制之setBounds

2019-11-18 17:57:54
字體:
來源:轉載
供稿:網友


//做的改動

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);
       Offset :=Pos ('(',Text );

       if Offset =0 then
          Offset :=Pos ('"',Text );

       R.Left :=R.Left +Offset*5;
       R.Right :=R.Right -5;

3.//function TStringEditLink.BeginEdit: Boolean;
  //to show hint while editing
  FTree.Hint :=FTree.GetText(FNode,0);
  FTree.ShowHint :=True ;

4.
procedure TScriptsForm.DataTreeCreateEditor(Sender: TBaseVirtualTree;
  Node: PVirtualNode; Column: TColumnIndex; out EditLink: IVTEditLink);

begin
   EditLink:= TStringEditLink.Create ;

end;


上一篇:創建具有托盤的服務程序

下一篇:編程實現網頁表單數據的自動提交

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
學習交流
熱門圖片

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 忻州市| 延庆县| 古丈县| 南康市| 梧州市| 陵川县| 连城县| 宁德市| 项城市| 岱山县| 临汾市| 江达县| 呼图壁县| 土默特左旗| 宾川县| 四平市| 巴青县| 高台县| 黑水县| 修文县| 长乐市| 黑水县| 福泉市| 灌云县| 瑞丽市| 佛冈县| 大理市| 南涧| 海安县| 海城市| 东兰县| 光山县| 泽库县| 乌恰县| 寿阳县| 临桂县| 深泽县| 陈巴尔虎旗| 巢湖市| 息烽县| 洪泽县|