I'm recently working on an Dart-Counter.
I have a Dartboard presented on a TImage
and for every counting position there is a TShape
.
Is it possible to assigne a value to a TShape
, because the TShape
does not like integer?
Thanks.
I'm recently working on an Dart-Counter.
I have a Dartboard presented on a TImage
and for every counting position there is a TShape
.
Is it possible to assigne a value to a TShape
, because the TShape
does not like integer?
Thanks.
You could use the Tag
property to store your integer value, if nothing else is using that property.
Tag
has no predefined meaning. TheTag
property can store any additional integer value for the convenience of developers.
Another way would be to derive a sub-class of TShape
and add a property to store the information. This would allow you to give the property a more meaningful name, and make the intent clear.
I would comment though that building up a complex visual user interface out of TShape
objects is perhaps an inefficient and error prone way to go about your task. Usually for a task like this is would be better to make a custom control that painted itself appropriately, without the use of sub-components.