AttributeInfo.Value

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Variant )
aAttributeInfo.Value = newVariantValue
or
VariantValue = aAttributeInfo.Value

Supported for all project types and targets.

The optional value of the attribute.

Sample Code

Suppose Window1 has three attributes: The first attribute contains the Name only and the others have both a Name and Value:

Name Value
myName1
myName2 "Foo"
myName3 23

The following code retrieves the attributes and displays them in a ListBox:

For Each attribute As Introspection.AttributeInfo In Introspection.GetType(window1).GetAttributes
ListBox1.AddRow attribute.Name
If attribute.Value.IsNull Then
ListBox1.CellValueAt(ListBox1.LastAddedRowIndex,1) = "No Value"
Else
ListBox1.CellValueAt(ListBox1.LastAddedRowIndex,1) = attribute.Value
End If
Next