using lately DDD.CollectViewsData...
well thought it was easy to enable and disable SwiftButtons... but it seems different because Swiftbuttons are B4X CustomViews...
GetViewByName returns a B4XView, which means that it doesn't return the custom view, but rather the base panel.
With most custom views, you can get the custom view from the Tag property:
B4X:
dd.GetViewByName(Root, "SwiftButton1").Tag.As(SwiftButton).Enabled = False
'or:
Dim btn As SwiftButton = dd.GetViewByName(Root, "SwiftButton1").Tag
GetViewByName returns a B4XView, which means that it doesn't return the custom view, but rather the base panel.
With most custom views, you can get the custom view from the Tag property:
B4X:
dd.GetViewByName(Root, "SwiftButton1").Tag.As(SwiftButton).Enabled = False
'or:
Dim btn As SwiftButton = dd.GetViewByName(Root, "SwiftButton1").Tag
GetViewByName returns a B4XView, which means that it doesn't return the custom view, but rather the base panel.
With most custom views, you can get the custom view from the Tag property:
B4X:
dd.GetViewByName(Root, "SwiftButton1").Tag.As(SwiftButton).Enabled = False
'or:
Dim btn As SwiftButton = dd.GetViewByName(Root, "SwiftButton1").Tag