TIWImage     //用于显示资源中的图片, 设计时通过 Picture 载入图片到资源
TIWImageFile //用于显示给定路径或地址的图片
TIWImageList //它继承于 TImageList, 一般用于图标管理, 一般也是在设计时载入图片以进入资源

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

主要成员:


property Picture: TPicture  //通过它载入图片; 设计时载入的图片会嵌入资源; 如果用它动态加载或许是为使用其更多功能, 否则不如用 TIWImageFile
property TransparentColor: TIWColor //透明色; 只对 png、gif
property OutputType: TIWImageOutput //输出类型(也就是最终用到 Html 的类型): ioGIF, ioJPEG, ioPNG(默认)
property JpegOptions: TIWJpegOptions //当 OutputType = ioJPEG 时的更多选项(下有详注)
property RenderEmptyAsSpan: Boolean //该属性默认 True, 表示没有图片可显示时将在 Html 中呈现为 SPAN 而不是 IMG
property AltText: string //当图像无法显示时的替换文本
property AutoSize: Boolean //自动大小
property UseSize: Boolean //使用指定的大小
property BorderOptions: TIWBorderOptions //边框选项; 主要是 Width 和 Color
property Confirmation: string //
property DoSubmitValidation: Boolean // property OnClick: TNotifyEvent
property OnMouseDown: TIWImageOnMouseDown
property OnAsyncClick: TIWAsyncEvent
property OnAsyncMouseDown: TIWAsyncEvent
property OnAsyncMouseUp: TIWAsyncEvent {TIWJpegOptions 类的属性}
property CompressionQuality: Shortint //压缩比率; 默认 90
property Performance: TJPEGPerformance //质量选项; jpBestQuality、jpBestSpeed(默认)
property ProgressiveEncoding: Boolean //是否使用递增式编码(图像较大时, 从模糊到清晰); 默认 False
property Smoothing: Boolean //是否平滑处理; 默认 True

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

主要成员:


property ImageFile: TIWFileReference //这是它最主要的属性; ImageFile.Filename 或 ImageFile.URL
property Cacheable: Boolean //是否使用缓存
property AltText: string //
property AutoSize: Boolean //
property UseSize: Boolean //
property BorderOptions: TIWBorderOptions //
property Confirmation: string //
property DoSubmitValidation: Boolean // property OnClick: TNotifyEvent
property OnMouseDown: TIWImageOnMouseDown
property OnAsyncClick: TIWAsyncEvent
property OnAsyncMouseDown: TIWAsyncEvent
property OnAsyncMouseUp: TIWAsyncEvent

TIWImageList 所在单元及继承链:
IWImageList.TIWImageList

主要成员:


property BkColor: TColor    //背景色
property BlendColor: TColor //混合色; 在产生 DrawingStyle 需要的不同效果时需要
property ColorDepth: TColorDepth //颜色深度
property DrawingStyle: TDrawingStyle //dsFocus(焦点状态)、dsNormal(正常,默认)、dsSelected(选择状态)、dsTransparent(透明)
property ImageType: TImageType //图像类型: itImage(原图像)、itMask(遮罩)
property ShareImages: Boolean //?
property Masked: Boolean //? property Count: Integer //
property Height: Integer //
property Width: Integer // property OnChange: TNotifyEvent // function ExtractImageToCache(AImageIndex: Integer; const ACacheType: TCacheType): string //提取到缓存, 返回路径;
//IW.CacheStream.TCacheType 是缓存期选项, 默认 ctOneTime
//TCacheType = (ctOneTime、ctApp、ctSession、ctForm)

示例(通过 TIWImageFile 遍历 TIWImageList 中的图片):


var i: Integer;

procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
var
imgFilePath: string;
begin
imgFilePath := IWImageList1.ExtractImageToCache(i);
IWImageFile1.ImageFile.Filename := imgFilePath;
Inc(i);
if i = IWImageList1.Count then i := 0;
end;

使用 IntraWeb (18) - 基本控件之 TIWImage、TIWImageFile、TIWImageList的更多相关文章

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

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

  2. ExtJS4.2学习(18)时间控件(转)

    鸣谢:http://www.shuyangyang.com.cn/jishuliangongfang/qianduanjishu/2013-12-22/190.html 感谢“束洋洋 ”的付出. 前言 ...

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

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

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

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

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

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

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

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

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

    TIWTimer //和 TTimer 没多大区别, 它的默认事件现在是异步的(OnAsyncTimer), 在网络上使用 OnTimer 肯定是非常糟糕的 TIWProgressBar //进度条 ...

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

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

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

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

随机推荐

  1. 10个造型奇特的css3进度条(有的html被编辑器转义了,上面的代码还是OK的)。。。转载

    <div id="caseVerte"> <div id="case1"></div> <div id="c ...

  2. 利用fiddler来模拟低速环境

    为了让我们的站点拥有更好的用户体验,更短的加载时间,我们会“按需加载”页面的资源. 在调试程序的时候,我们希望能有一个低速率的网络环境来模拟真实线上的环境,这个时候fiddler(下载fiddler请 ...

  3. CF293B 方格(带技巧的搜索)

    solution: 首先我们根据一条路径上不能有两个相同颜色的格子可以得出: 对于两个格子 \((x_1 , y_1 )\) 和 \((x_2 , y_2 )\) 必须满足: \(x_1<x_2 ...

  4. MySQL5.6主从复制最佳实践

    MySQL5.6     主从复制的配置  环境 操作系统:CentOS-6.6-x86_64 MySQL 版本:mysql-5.6.26.tar.gz 主节点 IP:192.168.31.57    ...

  5. rstful登陆认证并检查session是否过期

    一:restful用户视图 #!/usr/bin/env python # -*- coding:UTF-8 -*- # Author:Leslie-x from users import model ...

  6. 基于theano的多层感知机的实现

    1.引言 一个多层感知机(Multi-Layer Perceptron,MLP)可以看做是,在逻辑回归分类器的中间加了非线性转换的隐层,这种转换把数据映射到一个线性可分的空间.一个单隐层的MLP就可以 ...

  7. mysql+mycat压力测试一例【转】

    前言 有很多人担心生产系统上新东西的程序怕压力跟不上和稳定性不行,是的,大家都怕,所以领导要求做一次压力测试,我个人也觉得是有必要的. 如果按原理来说,mycat如果不做分片,纯粹只是代理的话,他所做 ...

  8. expect学习笔记及实例详解【转】

    1. expect是基于tcl演变而来的,所以很多语法和tcl类似,基本的语法如下所示:1.1 首行加上/usr/bin/expect1.2 spawn: 后面加上需要执行的shell命令,比如说sp ...

  9. 006_mac osx 应用跨屏幕

    一般情况下 mac osx 中一个应用程序只能在一个屏幕上显示,作为从 windows 转过来的用户有点不太习惯,Goolge 后发现还是有解决方案的(虽然不是很好用). 打开 Mac 的系统偏好设置 ...

  10. Java中final关键字概述

    使用final修饰过的变量都不可以改变: 1.final修饰变量 恒定不变的属性,可以用final关键字来修饰: 变量名建议全部使用大写 final修饰的变量不能改变,如果程序中重新赋值,编译报错 例 ...