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;

相关阅读 >>

Delphi android windows ios通用获取程序版本

Delphi idhttp上传图给asp完美解决

Delphi 判断文件类型函数

Delphi json 转换成 tfdmemtable

Delphi sendemail 邮件发送单元

Delphi 显示windows断开网络驱动器对话框

Delphi 一个拼图工具的制作思路

Delphi 检测应用程序是否已停止响应

Delphi提示‘error loading midas.dll’的原因及解决方案

Delphi 文件路径相关的字符串操作

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...