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检查自身是否被调试

Delphi 改造shellexecute 精简函数

Delphi_关于null,nil

Delphi里实现对图片base64编码解码

Delphi mediaplayer1 设置音量

Delphi执行cmd命令和bat文件

Delphi dos编程

Delphi旋转位图

Delphi xe httpencode

Delphi用mapfileandchecksum 函数检测 exe 或 dll 是否被修改

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



打赏

取消

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

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

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

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

评论

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