Wish Yet another wish.... Attach custom Properties to views...

Cableguy

Expert
Licensed User
Longtime User
Hi Guys....

Some of you would find this wish useful, others not so much...
I know we can declare types and that when creating custom views, that we can also set custom properties to such views...
But imagine that we have Label, and we need to "attach" a boolean to it, let's say, "IamRed", this would allow to set Label1.IamRed = True, and/or to test the value.
This would differ from declaring a new variable and name it "label1IamRed"...
 

LucaMs

Expert
Licensed User
Longtime User
I know this is a "Wish" and Erel will respond if he sees fit, but I'll try to suggest something that perhaps you will find useful.

You could put a Map in the View Tag; you also create a constant for each key in the Map.

This way you could have:
B4X:
If Label1.Tag.As(Map).Get(C_MY_CONSTANT) = Something Then
 
Top