'Parameters: PrimaryColorID, SecondaryColorID, View(s)
Private Sub SetSwiftbuttonColor(DesignerArgs As DesignerArgs)
If DesignerArgs.FirstRun Then
Dim iPrimary As Int = GetColor(DesignerArgs.Arguments.Get(0))
Dim iSecondary As Int = GetColor(DesignerArgs.Arguments.Get(1))
For i = 2 To DesignerArgs.Arguments.Size - 1
Dim v As B4XView = DesignerArgs.GetViewFromArgs(i)
Dim sbtn As SwiftButton = v.Tag 'tag empty?
sbtn.SetColors(iPrimary, iSecondary)
Next
End If
End Sub
'in DesignedScript:
MyDDD.SetSwiftbuttonColor(4, 5, SwiftButton1)