[Lazarus] Problem with ComboBox
John vd Waeter
john at jvdw.nl
Wed Sep 1 19:47:47 CEST 2010
It is a string, so decimal separator is not involved. I think setting
the text likely invokes textsearch, like when typing, and then the
first occurance matching '11' is '11.2'.
See what happens if you place '11' before '11.2'
john
faber wrote:
> 2010/9/1 ik <idokan at gmail.com>:
>> Try to do something like
>>
>> ComboBox1.ItemIndex := 1;
>>
>
> Yes, in my case I must use loop:
> for i:=0 to ComBoBox1.Items.Count-1 do
> if faVar = strtofloat(ComboBox1.Items[i]) then begin
> ComboBox1.ItemIndex:=i;
> break;
> end;
>
> however ComboBox.Text:='11' should work if '11' is in ComboBox1.Items,
> when I replace '11.2' with '22' then it works,
> obviously the problem is with a decimal separator, so I thought it's a bug.
>
> best regards
> faber
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
John vd Waeter
www.jvdw.nl
www.gps-carpool.net
www.shotinthedark.nl
www.pdaforms.nl
www.dbapocket.nl
john at jvdw.nl
More information about the Lazarus
mailing list