Bidirectional Bindings in FMX

  

I’m quite new to Embarcaderos C++ Builder and tried to create a LiveBinding with a custom created Component.
The problem is: all properties I created can only read data (it is always an unidirectional link).

#ifndef Component1H
#define Component1H
//—————————————————————————
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
//—————————————————————————
class PACKAGE TComponent1 : public TComponent
{
private:
int m_counter;
protected:
public:
__fastcall TComponent1(TComponent* Owner);
__published:

__property int Counter = {read = m_counter, write = m_counter};
};

(I got [dial-Value]—–>[Component1-counter] and want: [Dial-Value]<—–>[Component1-Counter])

All I found are Delphi solutions… (e.g. [ObservableMember(‘Counter’)] ) and http://www.adug.org.au/technical/vcl/using-livebindings-to-connect-the-ui-to-objects/
But my Delphi knowledge is practically nonexistent.

Can somebody help me with a C++ solution?

Comments are closed.