使用 IntraWeb (18) - 基本控件之 TIWImage、TIWImageFile、TIWImageList
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的更多相关文章
- 使用 IntraWeb (24) - 基本控件之 TIWFileUploader、TIWFile
TIWFileUploader 是基于 Ajax 的上传控件, 最初是 Andrew Valums 开发, 从 IntraWeb XIV 纳入并替换 TIWFile. 虽然从组件面板上还能看到 TIW ...
- ExtJS4.2学习(18)时间控件(转)
鸣谢:http://www.shuyangyang.com.cn/jishuliangongfang/qianduanjishu/2013-12-22/190.html 感谢“束洋洋 ”的付出. 前言 ...
- 使用 IntraWeb (29) - 基本控件之 TIWAutherList、TIWAutherINI、TIWAutherEvent
TIWAutherList //通过一组户名与密码验证登陆 TIWAutherINI //通过记录户名与密码信息的 #Auth.ini 文件验证登陆 TIWAutherEvent //通过其 OnCh ...
- 使用 IntraWeb (28) - 基本控件之 TIWTemplateProcessorHTML、TIWLayoutMgrHTML、TIWLayoutMgrForm
TIWTemplateProcessorHTML //使用外部的 html 文件做模板 TIWLayoutMgrHTML //直接输入 Html 文本做模板 TIWLayoutMgrForm //这应 ...
- 使用 IntraWeb (26) - 基本控件之 TIWMenu
TIWMenu 的任务是让原来的 TMainMenu 呈现在网页上, 通过其 AttachedMenu 属性关联一个 TMainMenu 是必需的. TIWMenu 所在单元及继承链: IWCompM ...
- 使用 IntraWeb (25) - 基本控件之 TIWRegion
这应该是 IW 中最重要的容器了, 和它同父的还有 TIWTabControl TIWRegion 所在单元及继承链: IWRegion.TIWRegion 主要成员: property Align: ...
- 使用 IntraWeb (23) - 基本控件之 TIWTimer、TIWProgressBar、TIWProgressIndicator、TIWTimeEdit
TIWTimer //和 TTimer 没多大区别, 它的默认事件现在是异步的(OnAsyncTimer), 在网络上使用 OnTimer 肯定是非常糟糕的 TIWProgressBar //进度条 ...
- 使用 IntraWeb (22) - 基本控件之 TIWCalendar
TIWCalendar: 日历控件, 继承于 TIWCustomGrid, 所以它和 TIWGrid 共同属性特多. 它的 Cell 是 TIWCalendarCell 对象, 直接从 TIWGrid ...
- 使用 IntraWeb (20) - 基本控件之 TIWGrid
TIWGrid 最终通过 Html Table 呈现; 其每个 Cell 都是一个 TIWGridCell 对象, Cell 对象的 Control 属性非常好, 可以非常方便地嵌入其他控件. TIW ...
随机推荐
- [转载]JavaScript异步编程助手:Promise模式
http://www.csdn.net/article/2013-08-12/2816527-JavaScript-Promise http://www.cnblogs.com/hustskyking ...
- [整]Android开发优化-布局优化
优化布局层次结构 一个普遍的误解就是,使用基本的布局结构会产生高效的布局性能.然而每一个添加到应用的控件和布局,都需要初始化,布局位置和绘制.比如,使用一个嵌套的LinearLayout会导致过深的布 ...
- JavaScript编写风格指南 (二)
七:注释 // 频繁的使用注释有助于他人理解你的代码// 1.代码晦涩难懂// 2.可能被误认为是错误的代码// 3.必要但不明显的针对特定浏览器的代码// 4.对于对象,方法或者属性,生成文档是有必 ...
- iOS常用小功能
CHENYILONG Blog 常用小功能 技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http://weibo.com/luohanchenyilong ...
- sequelize初使用
官网地址:Sequelize Sequelize is a promise-based ORM for Node.js v4 and up. It supports the dialects Post ...
- WPF UI 开源专贴
1.ReactiveUI https://github.com/reactiveui/ReactiveUI http://www.reactiveui.net A MVVM framework tha ...
- elasticsearch如何使用?
ES和关系型数据库的数据对比 1.创建索引库PUT/POST都可以,索引库名称必须全部小写,不能以下划线开头,也不能包含逗号curl -XPUT 'http://192.168.136.131:920 ...
- poj1093
题意:给出一个句子和要求整理后每行包含的字符数,要求将其整理为一种总badness最小的形式.设每个空格长度为n,单个空格的badness计算公式为(n-1)^2.总badness等于所有空格的bad ...
- PHP中的__clone()
1 <?php 2 class Account { 3 public $balance; 4 5 public function __construct($balance) { 6 $this- ...
- java 接口与工厂
接口时实现多重继承的途径,而生产遵循某个接口的对象的典型方式就是工厂方法设计模式,这与直接调用构造器不同,我们在工厂对象上调用的是某种方法,而该工厂对象将生成接口的某个实现的对象,理论上通过这种方式, ...