我有绑定字符串属性到TLabel
的问题。自定义组件属性LiveBindings
TGotManager = class(TComponent)
..
..
published
property HotQ1: String read FHotQ1 write SetHotQ1;
property HotQ2: string read FHotQ2 write SetHotQ2;
..
我确实创建了一个组件,因为我不想使用TPrototypeDatasource。
我的目标是通过设计师将两个属性绑定到TLabel.text
。
我这样做是从答案在这里帮助:Delphi: Making a component visible to live binding
例1:
//with this only HotQ1 is bindable via the designer.
[ObservableMember('HotQ1')]
TGotManager = class(TComponent)
例2:
//with this only HotQ2 is bindable via the designer.
[ObservableMember('HotQ1')]
[ObservableMember('HotQ2')]
TGotManager = class(TComponent)
的问题是,我只能通过一个属性绑定设计师。拖动该属性时,其他兼容的灯将亮起绿色。拖动第二个属性时,其他属性保持红色。
“我成功了,只有一个属性”那么,你与其他财产的成功缺乏如何体现? – MartynA
@martynA我会编辑问题并解释 – Edward
@martynA我希望现在清楚 – Edward