论坛


2011年10月2日 星期日

表达式Delphi XE2 之 FireMonkey 入门(26) - 数据绑定: TBindingsList: TBindExprItems

万一| 万一的 Delphi 博客 |23:05:00

如果要给一对 "源控件" 和 "目标控件" 写多个表达式, 使用 TBindExpression 就不如 TBindExprItems 了.TBindExprItems 中的表达式又分两组: FormatExpressions、ClearExpressions, 后者是在断开绑定时的表达式.示例设想:1、TrackBar1 为源, 把其 Value 值绑定给 Edit...

Delphi XE2 之 FireMonkey 入门(25) - 数据绑定: TBindingsList: 表达式的灵活性及表达式函数

万一| 万一的 Delphi 博客 |18:25:00

绑定表达式中可以有简单的运算和字符串连接, 但字符串需放在双引号中.还可以使用 TBindingsList.Methods 提供的一组表达式函数(来自 System.Bindings.Methods 单元):ToStr()ToVariant()Round()Format()UpperCase()LowerCase()FormatDateTime()StrToDateTime()Max()Mi...

Register for CodeRage 6 - Free Online Conference for Software Developers

Embarcadero| EDN Delphi Feed |17:00:00

Delphi XE2 之 FireMonkey 入门(24) - 数据绑定: TBindingsList: TBindExpression.Direction

万一| 万一的 Delphi 博客 |14:12:00

在学习 BindingSource 属性时, 可以让两个控件互为绑定源; TBindExpression 对应的功能是 Direction 属性.先在窗体上添加 Edit1、Edit2、BindingsList1; 然后激活 Edit1、Edit2 和窗体的默认事件.procedure TForm1.FormCreate(Sender: TObject);begin with TBindExp...

Delphi XE2 之 FireMonkey 入门(23) - 数据绑定: TBindingsList: TBindExpression

万一| 万一的 Delphi 博客 |11:24:00

准备用 TBindingsList 重做上一个例子.可以先把 TBindingsList 理解为是一组绑定表达式(TBindExpression)的集合;官方应该是提倡在设计时完成 TBindExpression 的建立与参数设置, 但我觉得看运行时的代码会更容易理解.1、先在窗体上添加 添加 TrackBar1、Edit1、Label...