FMX Metropolis UI アプリケーションをコーディングし、文字列型の 2 つのフィールド値を、LiveBindings テクノロジ (式エンジンを使用) によって TListBox の Item.Title メンバーに割り当てようとしています。
TBindList を次のように使用すると:
object BindList1: TBindList
Category = 'Lists'
ControlComponent = ListBox1
SourceComponent = BindSourceDB1
FormatExpressions = <
item
ControlExpression = 'Text'
SourceExpression =
'FieldByName("name1").Text + " " + Field' +
'ByName("name2").Text'
end>
FormatControlExpressions = <>
ClearControlExpressions = <>
end
「name1 name2」文字列をメンバーに割り当てますが、TBindList クラスにそのようなプロパティがないText
ため、設定に失敗しますListItemStyle := MetropolisUI
私が使用する場合TLinkFillControlToField
object LinkFillControlToField2: TLinkFillControlToField
Category = 'Quick Bindings'
Control = ListBox1
Track = True
FillDataSource = BindSourceDB1
FillDisplayFieldName = 'name1'
AutoFill = True
BufferCount = -1
AutoBufferCount = False
FillExpressions = <>
FillHeaderExpressions = <>
FillBreakGroups = <>
end
に割り当てることListItemStyle
ができますが、プロパティでMetropolisUI
アクセスできるフィールドは 1 つだけで、それに割り当てるフィールドはありません。FillDisplayFieldName
SourceExpression
'FieldByName("name1").Text + " " + FieldByName("name2").Text'
I tried to guess context of Item.Text
member of TListBox
from TBindList
but I did not manage to. I studied Delphi samples but there is no Metropolis TListBox and it seems to act in a different way than the common one. Does anybody have any ideas how to find the solution for this issue?