8288分类目录 8288分类目录 8288分类目录
  当前位置:海洋目录网 » 站长资讯 » 站长资讯 » 文章详细 订阅RssFeed

使用 IntraWeb (23) - 基本控件之 TIWTimer、TIWProgressBar、TIWProgressIndicator、TIWTimeEdit

来源:本站原创 浏览:144次 时间:2021-09-17
使用 IntraWeb (23) - 基本控件之 TIWTimer、TIWProgressBar、TIWProgressIndicator、TIWTimeEdit    


TIWTimer             //和 TTimer 没多大区别, 它的默认事件现在是异步的(OnAsyncTimer), 在网络上使用 OnTimer 肯定是非常糟糕的TIWProgressBar       //进度条TIWProgressIndicator //进度提示器; 这是个新东西, 非常好; 当碰到时间较长的加载时(同步或异步)都可以用用; 使用前需要先关联到窗体的 ProgressIndicator 属性TIWTimeEdit          //个人认为这个东西一点用也没有; 只是给个分钟数按 8 小时换算成天、周之类, 如果需要还不如写个函数.


TIWTimer 所在单元及继承链:
IWCompExtCtrls.TIWTimer < TIWBaseHTML40Component < TIWBaseHTMLComponent < TIWBaseComponent < TComponent < TPersistent < TObject

主要成员:


property Interval: Integer //property Enabled: Boolean  //property OnTimer: TNotifyEvent       //property OnAsyncTimer: TIWAsyncEvent //



TIWProgressBar 所在单元及继承链:
IWCompProgressBar.TIWProgressBar < TIWCustomControl < TIWBaseHTMLControl < TIWBaseControl < TIWVCLBaseControl < TControl < TComponent < TPersistent < TObject

主要成员:


property BGColor: TIWColor //底色property Color: TIWColor   //进度色property Percent: Integer  //当前进度(0-100)property ShowText: Boolean //是否显示进度比例文本property Font: TIWFont     //


测试:


{在窗体上放 IWTimer1、TIWProgressBar1}procedure TIWForm1.IWAppFormCreate(Sender: TObject);begin  IWProgressBar1.ShowText := True;  IWProgressBar1.Color := $0000FF;  IWProgressBar1.Font.Color := $FFFFFF;end;procedure TIWForm1.IWTimer1AsyncTimer(Sender: TObject; EventParams: TStringList);begin  IWProgressBar1.Percent := IWProgressBar1.Percent + 10;  if IWProgressBar1.Percent >= 100 then IWTimer1.Enabled := False;end;





TIWProgressIndicator 所在单元及继承链:
IWCompProgressIndicator.TIWProgressIndicator < TComponent < TPersistent < TObject

主要成员��־,��־:


property Css: string  //这个弹出的等待窗口其实就是一个包含着 Table 的 Div, 可通过 Css 或下面几个属性弄得好看一点property BGColor: TIWColor  //property BoxColor: TIWColor //property BoxBorderColor: TIWColor //property BoxBorderWidth: Integer  //property Opacity: Integer //透明度(0-100); 但等待窗口弹出时, 整个页面会有一个透明的遮罩层 property Mode: TIWProgressIndicatorMode//有效模式: pimAsync(异步)、pimSync(同步,默认)、pimBoth(两者都用)property BoxVisible: Boolean   //是否以窗口的形式呈现; 默认 Trueproperty ImageVisible: Boolean //是否显示 Loading 动画图片; 默认 Trueproperty UserDefined: Boolean  //是否禁用; 默认 Falseproperty PreScript: TStrings       //property PostScript: TStrings   //property PreAsyncScript: TStrings  //property PostAsyncScript: TStrings //property ProgressTextSettings: TIWProgressTextSettings //提示文本相关设置property RenderTag: TIWHTMLTag //function Render: string//Render 方法和 RenderTag 属性应该老控件没有的; 在调试时它们还是有点用的


测试:


{在窗体上放 IWProgressIndicator1 和两个按钮}procedure TIWForm1.IWAppFormCreate(Sender: TObject);begin  Self.ProgressIndicator := IWProgressIndicator1; //关联到 IWProgressIndicator1  IWProgressIndicator1.Mode := pimBoth;           //让同步异步都有进度提示  IWProgressIndicator1.ProgressTextSettings.Text := '正在载入...';  IWProgressIndicator1.ProgressTextSettings.Font.Color := clWebGreen;end;{同步事件}procedure TIWForm1.IWButton1Click(Sender: TObject);begin  Sleep(3000); //等待 3 秒, 用于测试end;{异步事件}procedure TIWForm1.IWButton2AsyncClick(Sender: TObject; EventParams: TStringList);begin  Sleep(3000);end;





  推荐站点

  • At-lib分类目录At-lib分类目录

    At-lib网站分类目录汇集全国所有高质量网站,是中国权威的中文网站分类目录,给站长提供免费网址目录提交收录和推荐最新最全的优秀网站大全是名站导航之家

    www.at-lib.cn
  • 中国链接目录中国链接目录

    中国链接目录简称链接目录,是收录优秀网站和淘宝网店的网站分类目录,为您提供优质的网址导航服务,也是网店进行收录推广,站长免费推广网站、加快百度收录、增加友情链接和网站外链的平台。

    www.cnlink.org
  • 35目录网35目录网

    35目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向35目录推荐、提交优秀网站。

    www.35mulu.com
  • 就要爱网站目录就要爱网站目录

    就要爱网站目录,按主题和类别列出网站。所有提交的网站都经过人工审查,确保质量和无垃圾邮件的结果。

    www.912219.com
  • 伍佰目录伍佰目录

    伍佰网站目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向伍佰目录推荐、提交优秀网站。

    www.wbwb.net