delphi FMX Listbox长按复制(移动平台)  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi FMX Listbox长按复制(移动平台)


Delphi移动平台(Android & IOS) Listbox长按
查看更多关于 长按 的文章
复制
查看更多关于 复制 的文章
Detail内容

testLongTap
参考代码

procedure TForm1.FormCreate(Sender: TObject); //uses FMX.Platform,System.Rtti
begin
//初始化
 TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService,
 IInterface(FClipboardService));
end;

procedure TForm1.ListBox1Gesture(Sender: TObject;
 const [Ref] EventInfo: TGestureEventInfo; var Handled: Boolean);
//ListBox1的Touch--InteractiveGestures--LongTap要选中
begin
 case EventInfo.GestureID of
 igiLongTap:
  begin
   if ListBox1.Selected.ItemData.Detail <> '' then
    begin
     FClipboardService.SetClipboard
     (Tvalue(ListBox1.Selected.ItemData.Detail));
      Handled := true;
     showmessage('已复制' + ListBox1.Selected.ItemData.Text)
    end;
  end;
 end;
end;


推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.032377004623413 seconds