### Wrapping text in DropDownList

This is an example of wrapping text in a combobox dropdownlist.
The items listed are labels. The property of the label is set accordingly.
'Private ComboBox1 As ComboBox
For i = 0 To 9
Dim lbl1 As Label
lbl1.Initialize("")
lbl1.Text = "B4J HowTo WrapText in ComboBox Item " & i
lbl1.Font = fx.DefaultFont(14)
lbl1.TextColor = fx.Colors.Red
lbl1.PrefWidth = ComboBox1.PrefWidth
lbl1.WrapText = True
lbl1.Tag = i
ComboBox1.Items.Add(lbl1)
Next
Hint
It is also possible to forse wraptext by defining a CRLF.
With that, the selected item is also shown wrapped.
Example:
lbl1.Text = "B4J HowTo WrapText " & CRLF & "in ComboBox Item " & i
or using Smart Strings:
lbl1.Text = $"B4J HowTo WrapText ${CRLF} in ComboBox Item ${i}"$

Changed: , Category: ComboBox, File: T6C175M1277.htm, ID: 1277