Delphi XE2 を使用して VCL win32 アプリケーションを作成しています。Delphi XE2 はライブ バインディングをサポートしています。サンプルの Biolife.xml を TClientDataSet インスタンスに読み込みます。
TEdit コントロールをデータセットの文字列フィールドにバインドできます: Species Name:
object BindLinkEdit11: TBindLink
Category = 'Links'
SourceMemberName = 'Species Name'
ControlComponent = Edit1
SourceComponent = BindScopeDB1
ParseExpressions = <>
FormatExpressions = <
item
ControlExpression = 'Text'
SourceExpression = 'DisplayText'
end>
ClearExpressions = <>
end
次に、Graphic フィールドを TImage コントロールにバインドしようとしています。
object BindLinkImage11: TBindLink
Category = 'Links'
SourceMemberName = 'Graphic'
ControlComponent = Image1
SourceComponent = BindScopeDB1
ParseExpressions = <>
FormatExpressions = <
item
ControlExpression = 'Picture'
SourceExpression = 'Value'
end>
ClearExpressions = <>
end
どうやら、うまくいきません。そうすることは可能ですか?