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

TIWTimer 所在单元及继承链:
IWCompExtCtrls.TIWTimer

主要成员:


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

TIWProgressBar 所在单元及继承链:
IWCompProgressBar.TIWProgressBar

主要成员:


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

主要成员:


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 //是否以窗口的形式呈现; 默认 True
property ImageVisible: Boolean //是否显示 Loading 动画图片; 默认 True
property UserDefined: Boolean //是否禁用; 默认 False
property 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;



使用 IntraWeb (23) - 基本控件之 TIWTimer、TIWProgressBar、TIWProgressIndicator、TIWTimeEdit的更多相关文章

  1. 使用 IntraWeb (24) - 基本控件之 TIWFileUploader、TIWFile

    TIWFileUploader 是基于 Ajax 的上传控件, 最初是 Andrew Valums 开发, 从 IntraWeb XIV 纳入并替换 TIWFile. 虽然从组件面板上还能看到 TIW ...

  2. 使用 IntraWeb (29) - 基本控件之 TIWAutherList、TIWAutherINI、TIWAutherEvent

    TIWAutherList //通过一组户名与密码验证登陆 TIWAutherINI //通过记录户名与密码信息的 #Auth.ini 文件验证登陆 TIWAutherEvent //通过其 OnCh ...

  3. 使用 IntraWeb (28) - 基本控件之 TIWTemplateProcessorHTML、TIWLayoutMgrHTML、TIWLayoutMgrForm

    TIWTemplateProcessorHTML //使用外部的 html 文件做模板 TIWLayoutMgrHTML //直接输入 Html 文本做模板 TIWLayoutMgrForm //这应 ...

  4. 使用 IntraWeb (26) - 基本控件之 TIWMenu

    TIWMenu 的任务是让原来的 TMainMenu 呈现在网页上, 通过其 AttachedMenu 属性关联一个 TMainMenu 是必需的. TIWMenu 所在单元及继承链: IWCompM ...

  5. 使用 IntraWeb (25) - 基本控件之 TIWRegion

    这应该是 IW 中最重要的容器了, 和它同父的还有 TIWTabControl TIWRegion 所在单元及继承链: IWRegion.TIWRegion 主要成员: property Align: ...

  6. 使用 IntraWeb (22) - 基本控件之 TIWCalendar

    TIWCalendar: 日历控件, 继承于 TIWCustomGrid, 所以它和 TIWGrid 共同属性特多. 它的 Cell 是 TIWCalendarCell 对象, 直接从 TIWGrid ...

  7. 使用 IntraWeb (20) - 基本控件之 TIWGrid

    TIWGrid 最终通过 Html Table 呈现; 其每个 Cell 都是一个 TIWGridCell 对象, Cell 对象的 Control 属性非常好, 可以非常方便地嵌入其他控件. TIW ...

  8. 使用 IntraWeb (19) - 基本控件之 TIWTreeView

    这是个饱受非议的控件; 我通过尝试, 理解了非议, 也能理解作者. 总之向作者的思路靠拢吧, 还是不错的. TIWTreeView 所在单元及继承链: IWCompTreeview.TIWTreeVi ...

  9. 使用 IntraWeb (16) - 基本控件之 TIWList、TIWListbox、TIWComboBox、TIWOrderedListbox

    TIWList //列表; 它对应 Html 中的 OL.LI(某些选项下会用表格模拟); TIWListbox 和 TIWComboBox 则对应 Html 在的 Option TIWListbox ...

随机推荐

  1. dialog 菜单

    dialog 菜单 # 默认将所有输出用 stderr 输出,不显示到屏幕 使用参数 --stdout 可将选择赋给变量 # 退出状态 0正确 1错误 窗体类型 --calendar # 日历 --c ...

  2. [BZOJ 1032][JSOI 2007]祖玛 题解(区间DP)

    [BZOJ 1032][JSOI 2007]祖玛 Description https://www.lydsy.com/JudgeOnline/problem.php?id=1032 Solution ...

  3. Vue 使用 prerender-spa-plugin 添加loading

    主要配置代码: new PrerenderSPAPlugin({ staticDir: path.join(__dirname, 'dist'), routes: ['/', '/introducti ...

  4. lucene简介——(一)

    0.概念性东西 1.数据分类

  5. mongodb导出数据csv格式

    mongoexport -d test -c item --type=csv -f salary,city,workYear,companyShortName -o user.csvmongoexpo ...

  6. linux调试工具glibc的演示分析-core dump double free【转】

    转自:http://www.cnblogs.com/jiayy/p/3475544.html 偶然中发现,下面的两端代码表现不一样 void main(){ void* p1 = malloc(32) ...

  7. USB的挂起和唤醒(Suspend and Resume)【转】

    转自:http://m.blog.csdn.net/blog/luckywang1103/25244091 USB协议的第9章讲到USB可见设备状态[Universal Serial Bus Spec ...

  8. find查找时排除目录及文件

    查找根目录下大于500M的文件,排除/proc目录 find / ! -path "/proc/*" -type f -size +500M | sort -rh|xargs ls ...

  9. redis 配置文件翻译

    2014年6月24日 17:29:11 include  如果有其它配置文件,可以使用 include 指令 ####通用配置 daemonize  默认的redis不会以守护进程运行,需要这样的话可 ...

  10. 对象克隆及属性转换-JavaScript

    在某些项目中,需要将一些返回信息进行其他语言的翻译,可以为不同语言用户提供不同的语言版本.下面是一个实现: /** * @class Translate * @description 查询字典,翻译成 ...