livebindings

Need bidirectional LiveBindings between a control and an object

偶尔善良 提交于 2019-12-03 04:22:14
问题 In Delphi XE2 LiveBindings, I need to bind a VCL control of any type to a property of any type on an arbitrary (non-component) object. I can do this unidirectionally. But I need to do it bidirectionally. Let's say I want to bind a TPerson.PersonName: string to a TEdit.Text. What I have now is simple. Create a new VCL application, add a TBindScope, TBindingsList, TEdit. Create an instance of TPerson named person1. Using a BindingList, add a TBindExpression property. With BindExpression set

Need bidirectional LiveBindings between a control and an object

北战南征 提交于 2019-12-02 18:39:54
In Delphi XE2 LiveBindings, I need to bind a VCL control of any type to a property of any type on an arbitrary (non-component) object. I can do this unidirectionally. But I need to do it bidirectionally. Let's say I want to bind a TPerson.PersonName: string to a TEdit.Text. What I have now is simple. Create a new VCL application, add a TBindScope, TBindingsList, TEdit. Create an instance of TPerson named person1. Using a BindingList, add a TBindExpression property. With BindExpression set ControlComponent to Edit1 set ControlExpression to 'Text' set SourceComponent to BindScope1 set

How to get Item.LookupData and SelectedValue (as integer) of an FMX TComboBox at runtime?

99封情书 提交于 2019-11-28 14:18:15
There is a ComboBox on the FMX Form. It is binded with a datasource (table that has an id -integer and speciality - varchar fields) in the following manner- object LinkFillControlToField1: TLinkFillControlToField Category = 'Quick Bindings' Control = ComboBox1 Track = True FillDataSource = BindSourceDB1 FillValueFieldName = 'id' FillDisplayFieldName = 'speciality' AutoFill = True BufferCount = -1 AutoBufferCount = False FillExpressions = <> FillHeaderExpressions = <> FillBreakGroups = <> end It is simple to get access to the value of chosen speciality (from ComboBox1.Selected.Text ) but I can

How to get Item.LookupData and SelectedValue (as integer) of an FMX TComboBox at runtime?

别等时光非礼了梦想. 提交于 2019-11-27 08:13:33
问题 There is a ComboBox on the FMX Form. It is binded with a datasource (table that has an id -integer and speciality - varchar fields) in the following manner- object LinkFillControlToField1: TLinkFillControlToField Category = 'Quick Bindings' Control = ComboBox1 Track = True FillDataSource = BindSourceDB1 FillValueFieldName = 'id' FillDisplayFieldName = 'speciality' AutoFill = True BufferCount = -1 AutoBufferCount = False FillExpressions = <> FillHeaderExpressions = <> FillBreakGroups = <> end