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. Mysql select id 加上order by 后结果不一致

    测试数据将近280万 1.SELECT id FROM cbbd ORDER BY id LIMIT 900000,10 2.SELECT id FROM cbbd  LIMIT 900000,10 ...

  2. linq中let关键字学习

    linq中let关键字就是对子查询的一个别名,let子句用于在查询中添加一个新的局部变量,使其在后面的查询中可见. linq中let关键字实例 1.传统下的子查询与LET关键字的区别     C# 代 ...

  3. npm 更换阿里镜像

    使用NPM(Node.js包管理工具)安装依赖时速度特别慢,只需要使用–registry参数指定镜像服务器地址, npm install your-need-model --registry=http ...

  4. VS 多工程代码编写

    VS工作目录,输出目录 C++项目,解决方案总文件夹下就只包含解决方案配置文件sln和一个项目总文件夹和一个Debug文件夹以及一个Release文件夹(共四个东东,其中Debug和Release文件 ...

  5. SQL Server 索引(一)数据结构和存储结构

    本文关注以下方面(本文所有的讨论基于SQL Server数据库): 索引的分类: 索引的结构: 索引的存储 一.索引定义分类 让我们先来回答几个问题: 什么是索引? 索引是对数据库表中一列或多列的值进 ...

  6. 使用/dev/uinput的简要介绍(含demo程序)【转】

    转自:https://blog.csdn.net/zhongkunjia/article/details/75142699 uinput机制有2个很大的优点: 1) 不用自己写驱动(比如弄个红外遥控器 ...

  7. 阿里云RDS的mysql数据库占用空间超过90%的处理

    阿里云RDS数据库最大支持2T,目前已经占用了90%,如果进行分库或者迁移比较麻烦,思路是找出占用空间过大的日志或不重要的文件进行删除操作 查询所有数据库占用磁盘空间大小的SQL语句: show bi ...

  8. Canvas 3D球形文字云动画特效

    Canvas 3D球形文字云动画特效 效果图: 代码如下,复制即可使用: (适用浏览器:360.FireFox.Chrome.Opera.傲游.搜狗.世界之窗. 不支持Safari.IE8及以下浏览器 ...

  9. 在centos中修改yum源为阿里源

    cd /etc/yum.repos.d 备份旧的配置文件:mv CentOS-Base.repo CentOS-Base.repo.bak 下载阿里源的文件: wget -O CentOS-Base. ...

  10. jenkins 2:用ssh agent插件在pipeline里实现scp和远程执行命令

    昨晚测试成功了. 现在ssh agent的认证,已不支持明文用户密码,而只能用加密方式实现. 所以我先在jenknis和nginx服务器之后,实现ssh免密码rsa证书登陆. 私钥放jenkins,公 ...