I have a business app where I use a Combobox for setting the form of address like in letters. For easy access to frequently used forms, the Change event goes like this:
Sub Change() Handles Change
dim mytext as text = me.text.ToText
if mytext = kSGDH or mytext = kSGAnrede or mytext = kliebeFormell or mytext = kliebePersönlich then
dim anrede as text = AnredeBox.text.ToText
dim Vorname as text = VornameField.text.ToText
dim nachname as text = NachnameField.text.ToText
me.text = MakeBriefAnrede(anrede, Vorname, Nachname, mytext)
end if
End Sub
And the MakeBriefAnrede method is
Private Function MakeBriefAnrede(anrede as text, Vorname as text, Nachname as Text, Formel as text) as text
dim extender as text = if (anrede = kHerr, "r", "")
dim brief as text
select case Formel
case kSGDH
brief = kSGDH
case kSGAnrede
brief = "Sehr geehrte"+extender+kspace+anrede+kspace+nachname
case kliebeFormell
brief = "Liebe"+extender+kspace+anrede+kspace+nachname
case kliebePersönlich
brief = "Liebe"+extender+kspace+vorname
end select
return brief
End Function
This works perfectly with macOS, but under Windows (where the return parameter brief is correct), the ComboBox.text is empty afterwards.
Any idea why?