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. H5 Day2 练习

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. 【整理】HTML5游戏开发学习笔记(3)- 抛物线运动

    1.预备知识(1)Canvas旋转的实现过程 window.onload = function(){ var ctx = document.getElementById('canvas1').getC ...

  3. update-rc.d使用

    在Linux系统下,一个Services的启动.停止以及重启通常是通过/etc/init.d目录下的脚本来控制的.然而,在启动或改变运行级别时,是在/etc/rcX.d中来搜索脚本.其中X是运行级别的 ...

  4. Python 3之str类型、string模块学习笔记

    Windows 10家庭中文版,Python 3.6.4, Python 3.7官文: Text Sequence Type — str string — Common string operatio ...

  5. 查看library的依赖树

    今天一同事问我如何解决包依赖重复的问题,我告诉他你可以用exclude,provide,compileOnly等关键字,他问我如何查找某个库依赖了什么,我说有一个插件,愣是想了好久没想起什么名字来,搜 ...

  6. (三)发布Dubbo服务

    我们现在来学习下发布Dubbo服务,主要参考dubbo开发包里的demo源码:由浅入深的讲解下这个小demo: github地址:https://github.com/apache/incubator ...

  7. FileOutputSteam入门

    FileOutputSteam 字节输入流 从控制台将字节保存到本地硬盘 package com.isoftstone.io; import java.io.FileOutputStream; imp ...

  8. 1 、在Linux(centos6.8)系统下的JDK安装与配置

    一.解压jdk安装包: 附上jdk1.8的下载地址: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-21 ...

  9. 如何区分prometheus中Histogram和Summary类型的metrics?

    要理解它们的区别,关键还是告业务应用. 但如何在学习时,如何区分呢? 有以下几个维度: histogram有bucket,summary在quatile. summary分位数是客户端计算上报,his ...

  10. 《NodeJS开发指南》第五章微博实例开发总结

    所有文章搬运自我的个人主页:sheilasun.me <NodeJS开发指南>这本书用来NodeJS入门真是太好了,而且书的附录部分还讲到了闭包.this等JavaScript常用特性.第 ...