[Wish] Spinner.Content

yttrium

Active Member
Licensed User
Longtime User
Simply a property field for objects that would support it. For example, a Spinner would have Spinner.Content (which doesn't exist right now), which is a List field. Normally this can be written (as compared to the syntax and methodology of other objects) to with Spinner.AddAll, but there's no way to actually retrieve a list of items this way, only set it.

For example, say I want to define a Spinner from a list:
B4X:
Dim x As List
x.Initialize2(Array As String("1", "2", "3", "4"))
Spinner.AddAll(x)

However, I want to be able to also pull the contents of said Spinner and compile it TO a list. Currently, I have to do:
B4X:
Dim z As List
z.Initialize
For count = 0 To VariantBox.Size - 1
   z.Add(VariantBox.GetItem(count))
Next
But I'd like to be able to do the following:
B4X:
Dim x As List
x.Initialize2(Spinner.Content)
 
Top