惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
博客园_首页
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
I
InfoQ
量子位
J
Java Code Geeks
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
Webroot Blog
Webroot Blog
Martin Fowler
Martin Fowler
D
Docker
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
罗磊的独立博客
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
Cyberwarzone
Cyberwarzone
P
Privacy & Cybersecurity Law Blog
Last Week in AI
Last Week in AI
爱范儿
爱范儿
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
V
V2EX
Simon Willison's Weblog
Simon Willison's Weblog
AI
AI
Y
Y Combinator Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
V
Visual Studio Blog
H
Heimdal Security Blog
S
Secure Thoughts
B
Blog RSS Feed
雷峰网
雷峰网
T
Tenable Blog
C
Check Point Blog
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Recent Commits to openclaw:main
Recent Commits to openclaw:main

博客园 - 万一

关于内存数据与 JSON 高亮 TRichEdit 当前行 使用 IntraWeb (45) - 活用 IntraWeb 使用 IntraWeb (44) - 测试读取 SqLite (三) 使用 IntraWeb (43) - 测试读取 SqLite (二) 使用 IntraWeb (42) - 测试读取 SqLite (一) 使用 IntraWeb (41) - 数据控件速查 使用 IntraWeb (40) - 自定义 Session 数据 使用 IntraWeb (39) - THttpRequest、THttpReply 使用 IntraWeb (38) - TIWAppForm、TIWForm、TIWBaseHTMLForm、TIWBaseForm 使用 IntraWeb (37) - TIWApplication 使用 IntraWeb (36) - TIWServerControllerBase 使用 IntraWeb (35) - TIWJQueryWidget 使用 IntraWeb (34) - TIWAJAXNotifier 使用 IntraWeb (33) - Cookie 使用 IntraWeb (32) - Url 映射与 THandlers 使用 IntraWeb (31) - IntraWeb 的 Xml 操作使用的是 NativeXml 使用 IntraWeb (30) - TIWAppInfo、TIWMimeTypes、TIWAppCache 使用 IntraWeb (29) - 基本控件之 TIWAutherList、TIWAutherINI、TIWAutherEvent
使用 IntraWeb (28) - 基本控件之 TIWTemplateProcessorHTML、TIWLayoutMgrHTML、TIWLayoutMgrForm
万一 · 2014-06-20 · via 博客园 - 万一

TIWTemplateProcessorHTML //使用外部的 html 文件做模板
TIWLayoutMgrHTML         //直接输入 Html 文本做模板
TIWLayoutMgrForm         //这应该只是内部使用的东西, 对用户没有意义

{需要把它们关联到窗体的 LayoutMgr 属性; 主模板需要通过 IWServerController.MasterTemplate 指定}

TIWTemplateProcessorHTML 所在单元及继承链:
IWTemplateProcessorHTML.TIWTemplateProcessorHTML < TIWContainerLayout < TIWBaseContainerLayout < TIWBaseLayoutComponent < TIWVCLComponent < TComponent < TPersistent < TObject

主要成员:


property Enabled: Boolean       //使用或禁用模板, 默认 True
property MasterFormTag: Boolean	//是否使用主模板, 默认是 True; 如果要使用当前模板应该让它是 False
property TagType: TIWTemplateLayoutHTMLTagType //ttBorland、ttIntraWeb(默认); 默认使用 {%控件名%} 嵌入控件, 如果选择 ttBorland 则用 {#控件名#}
property Templates: TIWTemplateFiles //Templates.Default 默认指向 Templates\窗体名.html(如: IWForm1.html, 要求 Utf8格式), 也可以修改它(譬如动态变换模板时)
property RenderStyles: Boolean	     //?
property RemoveHiddenInputs: Boolean //移除隐藏控件, 默认 False
property MasterTemplate: string	     //也可以指定页面级的主模板, 但一般没必要

property OnUnknownTag: TIWUnknownTagEvent	  //处理没有对应控件情况, 一般用于自定义标签
property OnBeforeProcess: TIWTemplateProcessEvent //
property OnAfterProcess: TIWTemplateProcessEvent  //

function Able: Boolean		   //可通过该函数判断模板是否可用
function TemplatePathname: string; //可获取模板的详细地址

//在模板中使用容器中的控件: {% 容器名.控件名 %} 

OnUnknownTag 事件测试:


//假如在模板中自定义了 {%BaiduLogo%}
procedure TIWForm1.IWTemplateProcessorHTML1UnknownTag(const AName: string; var VValue: string);
begin
  if AName = 'BaiduLogo' then
    VValue := '<img src="http://www.baidu.com/img/baidu_sylogo1.gif"/>';
end;

TIWLayoutMgrHTML 所在单元及继承链:
IWLayoutMgrHTML.TIWLayoutMgrHTML < TIWContainerLayout < TIWBaseContainerLayout < TIWBaseLayoutComponent < TIWVCLComponent < TComponent < TPersistent < TObject

主要成员:


property HTML: TStringList //

property OnUnknownTag: TIWUnknownTagEvent //