Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: LiveBindings used in D10.1


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
Andrzej Gunther

Posts: 1
Registered: 3/8/12
LiveBindings used in D10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 30, 2017 12:06 AM
Hi
I'm going to link the two-way relationship TTrackBar (). position and TField.Value
For this purpose, I used the following code:
....
cds:TClientDataSet;
trbProwizja:: TTrackBar;
fbdl:TBindingsList;
....
procedure TfrmEdOfrt.initLB;
var
bds : TBindSourceDB;
gtd : TLinkPropertyToField;
begin
if fbds=nil then fbdl := TBindingsList.Create(Self);
bds := TBindSourceDB.Create(Self);
gtd := TLinkPropertyToField.Create(fbdl);
gtd.DataSource := bds;
gtd.FieldName := 'prowizja';
gtd.Component:=trbProwizja;
gtd.ComponentProperty:='position';
bds.DataSet := cds;
end;
However, with this solution relationship is one-way (change the selected property trackbar does not change the TNumericField().value)
What should I do to get a two-way relationship
Where can I find helpful documentation concerning the management of the LiveBindings in code

Thanks a lot
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02