M
mitenko
Hi y'all,
I've got a form that switches between English and Nepali, so a user can
enter data in either language. Data is stored in separate fields
according to what language it is. The user clicks a button and the form
changes its fonts and control sources.
However, switching with a combo box doesn't seem to work. When the
button is clicked, I collapse the ColumnWidths of the English fields
and expand the Nepali fields. This works for when you click on the
combobox and the menu list drops down, however, the text area for the
combobox (the Value or Text property) is stuck on the first column even
though its width has been shrunk to 0. So even if a user makes a
selection from the dropdown, all they get is gibberish (english text
translated into a nepali font isn't pretty) in the text area.
According to VB help the combobox displays the first visible column,
and shrinking a columns width to 0 automatically makes it
hidden/invisible. Has anyone else encountered this? Is there a way to
fix it?
Here's a snippet of the code:
Public Sub LangSwitch(toNepali As Boolean)
If (toNepali) Then
....
District_Label.FontName = "Preeti"
District_Label.FontSize = 13
District_Label.Caption = "lhNnf"
District.SetFocus
District.FontName = "Preeti"
District.FontSize = 13
District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
Else
....
District_Label.FontName = "MS Sans Serif"
District_Label.FontSize = 8
District_Label.Caption = "District"
'Debug.Print CStr(District.ColumnWidths)
District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
District.FontName = "MS Sans Serif"
District.FontSize = 8
End If
End Sub
I've got a form that switches between English and Nepali, so a user can
enter data in either language. Data is stored in separate fields
according to what language it is. The user clicks a button and the form
changes its fonts and control sources.
However, switching with a combo box doesn't seem to work. When the
button is clicked, I collapse the ColumnWidths of the English fields
and expand the Nepali fields. This works for when you click on the
combobox and the menu list drops down, however, the text area for the
combobox (the Value or Text property) is stuck on the first column even
though its width has been shrunk to 0. So even if a user makes a
selection from the dropdown, all they get is gibberish (english text
translated into a nepali font isn't pretty) in the text area.
According to VB help the combobox displays the first visible column,
and shrinking a columns width to 0 automatically makes it
hidden/invisible. Has anyone else encountered this? Is there a way to
fix it?
Here's a snippet of the code:
Public Sub LangSwitch(toNepali As Boolean)
If (toNepali) Then
....
District_Label.FontName = "Preeti"
District_Label.FontSize = 13
District_Label.Caption = "lhNnf"
District.SetFocus
District.FontName = "Preeti"
District.FontSize = 13
District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
Else
....
District_Label.FontName = "MS Sans Serif"
District_Label.FontSize = 8
District_Label.Caption = "District"
'Debug.Print CStr(District.ColumnWidths)
District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
District.FontName = "MS Sans Serif"
District.FontSize = 8
End If
End Sub