Hi all,
I'm using Basic4PPC V6.05 and want to load a ComboBox with a series of items (sample code is below).
Sub App_Start
Form1.Show
For i = 1.01 To 12 Step 0.01
If i = 1.45 Then
ComboBox1.Add (i & " xxx")
Else
If i = 2.5 Then
ComboBox1.Add (i & " xxx")
Else
ComboBox1.Add(i)
End If
End If
Next i
ComboBox1.SelectedIndex = 399 ' default display = 5 = index 399
End Sub
If I run the above inside the IDE its fine but when compiled to either device or desktop the combobox loads ok to "2.27" and the next value becomes "2.2799999999".
The extra 0.009999999999's are then added to all subsequent items in the ComboBox.
Any suggestions to solve this problem?
Thanks in advance
mollin1
I'm using Basic4PPC V6.05 and want to load a ComboBox with a series of items (sample code is below).
Sub App_Start
Form1.Show
For i = 1.01 To 12 Step 0.01
If i = 1.45 Then
ComboBox1.Add (i & " xxx")
Else
If i = 2.5 Then
ComboBox1.Add (i & " xxx")
Else
ComboBox1.Add(i)
End If
End If
Next i
ComboBox1.SelectedIndex = 399 ' default display = 5 = index 399
End Sub
If I run the above inside the IDE its fine but when compiled to either device or desktop the combobox loads ok to "2.27" and the next value becomes "2.2799999999".
The extra 0.009999999999's are then added to all subsequent items in the ComboBox.
Any suggestions to solve this problem?
Thanks in advance
mollin1