B4J Question [BANano] [SOLVED] How can I BANano.GetElement [ByData] Attribute?

Mashiane

Expert
Licensed User
Ola

I'm loading custom views with LoadLayoutArray. Each identifier of the element will be suffixed with _1, _2, _n? Perfect.

Now I'd like to assign a data attribute to the elements e.g. btnSave, btnOpen, btnDelete with data-id=btnsave etc. This works.

How can I get the reference to the element anywhere in my code by data attribute search?

For example use something like

B4X:
dim el as BANanoElement = BANano.GetElement[ByDaya]("btnSave")

Thanks
 
Top