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. html5 canvas 填充渐变形状

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. [整]Android开发优化-布局优化

    优化布局层次结构 一个普遍的误解就是,使用基本的布局结构会产生高效的布局性能.然而每一个添加到应用的控件和布局,都需要初始化,布局位置和绘制.比如,使用一个嵌套的LinearLayout会导致过深的布 ...

  3. BZOJ4818 序列计数

    4818: [Sdoi2017]序列计数 Time Limit: 30 Sec  Memory Limit: 128 MB Description Alice想要得到一个长度为n的序列,序列中的数都是 ...

  4. python中的__enter__ __exit__

    我们前面文章介绍了迭代器和可迭代对象,这次介绍python的上下文管理.在python中实现了__enter__和__exit__方法,即支持上下文管理器协议.上下文管理器就是支持上下文管理器协议的对 ...

  5. OpenWRT开发之——对C++的支持(解决库依赖问题)【转】

    转自:https://my.oschina.net/hevakelcj/blog/411944 摘要: 本文尝试用C++来开发一个cpp-demo包 遇到打包库依赖的问题,分析打包过程并解决了这个问题 ...

  6. mac rsync文件传输

    rsync -avz filename servername:/filename --exclude '*.log' --exclude '*.pyc' --exclude '*.db' --excl ...

  7. 百度编辑器ueditor 字符限制

    百度编辑器ueditor 字符限制 默认只能输入10000个字符 修改 ueditor.config.js // ,wordCount:true //是否开启字数统计 // ,maximumWords ...

  8. 002_tmux详解

    参考下赖老师的: http://mingxinglai.com/cn/2012/09/tmux/ 一. 二. http://wdxtub.com/2016/03/30/tmux-guide/   (待 ...

  9. Extjs Window用法详解 3 打印具体应用,是否关掉打印预览的界面

    Extjs Window用法详解 3 打印具体应用,是否关掉打印预览的界面   Extjs 中的按钮元素 {xtype: 'buttongroup',title: '打印',items: [me.ts ...

  10. eclipse开发mapreduce程序时出现的问题

    1.报HDFS权限不够:org.apache.hadoop.security.AccessControlException: Permission denied:user=ouqiping, acce ...