Trying to construct a smart string literal to be passed to a BBCodeView.
The BBCodeView needs to show items lined up in 2 columns, and I am using a TableRow Sub to construct this string.
Having a problem constructing this string literal and tried many variations, but so far not been successful.
Code should be something like this, just to construct the first row:
Sub MakeStringLiteral
Dim str As String
str = $"
${TableRow(${Array As String("App version", ${strVersion})})}
"$
End Sub
Sub TableRow(arrFields() As String) As String
Select Case arrFields.Length
Case 1
Return $"
[Span MinWidth=100%x Alignment=center]${arrFields(0)}[/Span]"$
Case 2
Return $"
[Span MinWidth=50%x Alignment=center]${arrFields(0)}[/Span]
[Span MinWidth=50%x Alignment=center]${arrFields(1)}[/Span]"$
Case 3
Return $"
[Span MinWidth=33%x Alignment=center]${arrFields(0)}[/Span]
[Span MinWidth=33%x Alignment=center]${arrFields(1)}[/Span]
[Span MinWidth=33%x Alignment=center]${arrFields(2)}[/Span]"$
Case 4
Return $"
[Span MinWidth=25%x Alignment=center]${arrFields(0)}[/Span]
[Span MinWidth=25%x Alignment=center]${arrFields(1)}[/Span]
[Span MinWidth=25%x Alignment=center]${arrFields(2)}[/Span]
[Span MinWidth=25%x Alignment=center]${arrFields(3)}[/Span]"$
Case 5
Return $"
[Span MinWidth=20%x Alignment=center]${arrFields(0)}[/Span]
[Span MinWidth=20%x Alignment=center]${arrFields(1)}[/Span]
[Span MinWidth=20%x Alignment=center]${arrFields(2)}[/Span]
[Span MinWidth=20%x Alignment=center]${arrFields(3)}[/Span]
[Span MinWidth=20%x Alignment=center]${arrFields(4)}[/Span]"$
Case Else
Return ""
End Select
End Sub
Any advice how this can be done?
RBS