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 streamtohexstr

Delphi xe5如何像手机qq一样最小化后显示图标

Delphi的unicode与gb2312转转换,汉字unicode转gb2312

Delphi xe5实现的一个阳历转换成阴历的代码

Delphi 获取文件名不带扩展名

Delphi2010 图片格式转换bmp, png,jpeg, gif, tiff , wmphoto

indy 中idhttp元件出现http status 302错误

Delphi 文件转换base64

Delphi goto语句用法

改写个Delphi 版 lz前辈的openprocess

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



打赏

取消

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

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

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

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

评论

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