加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

delphi – 使用Firemonkey,如何向用户提供反馈? (crHourglass)

发布时间:2020-12-15 09:51:43 所属栏目:大数据 来源:网络整理
导读:通常,当我有一个需要一些时间的任务时,我使用这样的脚本: procedure Work;var cPrevious: TCursor;begin cPrevious := Screen.Cursor; Screen.Cursor := crHourGlass; try // the task finally Screen.Cursor := cPrevious; end;end; 使用FireMonkey,Screen
通常,当我有一个需要一些时间的任务时,我使用这样的脚本:

procedure Work;
var
  cPrevious: TCursor;
begin
  cPrevious     := Screen.Cursor;
  Screen.Cursor := crHourGlass;

  try    
  // the task

  finally    
    Screen.Cursor := cPrevious;
  end;
end;

使用FireMonkey,Screen没有属性:Cursor.

向用户提供反馈的最佳方式是什么?

我按照评论和答案…使用不透明度较低的TPanel和TAniIndicator(我也模糊了其他组件):

谢谢!

解决方法

就像@mjn指出的那样,玻璃时光标不再是你可以利用的唯一等待模式.

例如,在Silverlight / WPF中,您可以使用繁忙的指示器控件,
http://www.codeproject.com/KB/silverlight/SilverlightBusyIndicator.aspx

所以你可以尝试在FireMonkey中做类似的事情.您可能已经有类似的控件可供使用,或者您可以编写自己的控件.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读