I need to assign a TRectangle.Fill.Color from a database field using LiveBindings, it looks like a simple thing, but I could not do it. Maybe the field type, maybe the value, but when assigned from a PrototypedBinding...it works.
How can I assign a color using livebindings?
Thank you in advanced!
Here is a working example of what you need:
The field type is LongWord
because System.UITypes
declares TAlphaColor = type Cardinal
and both Cardinal
and LongWord
are aliases for UInt32
.
Watch the values generated by PrototypeBindSource
(on the right):
Check if the values from your database correspond to the unsigned integer values representing the required colors. Maybe you tried too small values?