In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
problems with TComboBox
problems with TComboBox
Hello ,
TComboBox (using the new obj files) causes me more problems:
1. After deleting the text in the Editcontrol of the ComboBox and entering
the 1st letter, ComboBox:cText contains and shows still the old deleted
text. Only after the second letter the content of :cText is changed. Is
this the intended behavior?
2. After selecting an item from the list ComboBox:cText does not update
immediately. How can I get the real text from the InplaceEdit just in
time?
3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0 and
not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is this
intended?
Please take a look in the testcode in combotest.zip
Regards
Ingo
Attached files ComboTest.zip (2.3 KB)Â
TComboBox (using the new obj files) causes me more problems:
1. After deleting the text in the Editcontrol of the ComboBox and entering
the 1st letter, ComboBox:cText contains and shows still the old deleted
text. Only after the second letter the content of :cText is changed. Is
this the intended behavior?
2. After selecting an item from the list ComboBox:cText does not update
immediately. How can I get the real text from the InplaceEdit just in
time?
3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0 and
not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is this
intended?
Please take a look in the testcode in combotest.zip
Regards
Ingo
Attached files ComboTest.zip (2.3 KB)Â
problems with TComboBox
Ingo,
Sorry, I don't English...
Debes utilizar el método OnChange() del ComboBox...
Te adjunto el Test.
Regards,
Xevi.
"Ingo" <ing.jh@web.de> escribió en el mensaje
news:[email=434ea5d3@ozsrvnegro.ozlan.local...]434ea5d3@ozsrvnegro.ozlan.local...[/email]
>
> Hello ,
> TComboBox (using the new obj files) causes me more problems:
>
> 1. After deleting the text in the Editcontrol of the ComboBox and entering
> the 1st letter, ComboBox:cText contains and shows still the old deleted
> text. Only after the second letter the content of :cText is changed. Is
> this the intended behavior?
>
> 2. After selecting an item from the list ComboBox:cText does not update
> immediately. How can I get the real text from the InplaceEdit just in
> time?
>
> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
> and
> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
> this
> intended?
>
> Please take a look in the testcode in combotest.zip
>
> Regards
>
> Ingo
>
>
>
Attached files test.zip (1.9 KB)Â
Sorry, I don't English...
Debes utilizar el método OnChange() del ComboBox...
Te adjunto el Test.
Regards,
Xevi.
"Ingo" <ing.jh@web.de> escribió en el mensaje
news:[email=434ea5d3@ozsrvnegro.ozlan.local...]434ea5d3@ozsrvnegro.ozlan.local...[/email]
>
> Hello ,
> TComboBox (using the new obj files) causes me more problems:
>
> 1. After deleting the text in the Editcontrol of the ComboBox and entering
> the 1st letter, ComboBox:cText contains and shows still the old deleted
> text. Only after the second letter the content of :cText is changed. Is
> this the intended behavior?
>
> 2. After selecting an item from the list ComboBox:cText does not update
> immediately. How can I get the real text from the InplaceEdit just in
> time?
>
> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
> and
> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
> this
> intended?
>
> Please take a look in the testcode in combotest.zip
>
> Regards
>
> Ingo
>
>
>
Attached files test.zip (1.9 KB)Â
problems with TComboBox
Ingo,
> 1. After deleting the text in the Editcontrol of the ComboBox and entering
> the 1st letter, ComboBox:cText contains and shows still the old deleted
> text. Only after the second letter the content of :cText is changed. Is
> this the intended behavior?
No. It's fixed now, althought nIndex isn't update inmediately due to the own
windows control behavior
> 2. After selecting an item from the list ComboBox:cText does not update
> immediately. How can I get the real text from the InplaceEdit just in
> time?
There was a bug. Now you can get it reading the property cText at any time
> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
> and
> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
> this
> intended?
You are right. Now it's fixed.
> Please take a look in the testcode in combotest.zip
Thanks for the sample and the info. Here you are the fixed module.
--
Regards,
Jose F. Gimenez
Attached files ComboBox.zip (5.6 KB)Â
> 1. After deleting the text in the Editcontrol of the ComboBox and entering
> the 1st letter, ComboBox:cText contains and shows still the old deleted
> text. Only after the second letter the content of :cText is changed. Is
> this the intended behavior?
No. It's fixed now, althought nIndex isn't update inmediately due to the own
windows control behavior
> 2. After selecting an item from the list ComboBox:cText does not update
> immediately. How can I get the real text from the InplaceEdit just in
> time?
There was a bug. Now you can get it reading the property cText at any time
> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
> and
> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
> this
> intended?
You are right. Now it's fixed.
> Please take a look in the testcode in combotest.zip
Thanks for the sample and the info. Here you are the fixed module.
--
Regards,
Jose F. Gimenez
Attached files ComboBox.zip (5.6 KB)Â
problems with TComboBox
Jose,
thanks a lot for the rapid fix, but
1. now ComboBox:nIndex will be not aktualized when you select an item of the
list
2. ComboBox:GetText(nItem) returns not the complete element but only the
first letter. The returned string is the same like ComboBox:cText
//------------
METHOD GetText( nItem )
nItem: Posición del elemento en la lista
cText: Texto del elemento <---- should it be
the whole element?
Devuelve un elemento de la lista de valores
RETURN cText
//------------
Regards
Ingo
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=434eccc8@ozsrvnegro.ozlan.local...]434eccc8@ozsrvnegro.ozlan.local...[/email]
> Ingo,
>
>> 1. After deleting the text in the Editcontrol of the ComboBox and
>> entering
>> the 1st letter, ComboBox:cText contains and shows still the old deleted
>> text. Only after the second letter the content of :cText is changed. Is
>> this the intended behavior?
>
> No. It's fixed now, althought nIndex isn't update inmediately due to the
> own windows control behavior
>
>
>> 2. After selecting an item from the list ComboBox:cText does not update
>> immediately. How can I get the real text from the InplaceEdit just in
>> time?
>
> There was a bug. Now you can get it reading the property cText at any time
>
>
>> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
>> and
>> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
>> this
>> intended?
>
> You are right. Now it's fixed.
>
>
>> Please take a look in the testcode in combotest.zip
>
> Thanks for the sample and the info. Here you are the fixed module.
>
>
> --
> Regards,
>
> Jose F. Gimenez
>
>
thanks a lot for the rapid fix, but
1. now ComboBox:nIndex will be not aktualized when you select an item of the
list
2. ComboBox:GetText(nItem) returns not the complete element but only the
first letter. The returned string is the same like ComboBox:cText
//------------
METHOD GetText( nItem )
nItem: Posición del elemento en la lista
cText: Texto del elemento <---- should it be
the whole element?
Devuelve un elemento de la lista de valores
RETURN cText
//------------
Regards
Ingo
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=434eccc8@ozsrvnegro.ozlan.local...]434eccc8@ozsrvnegro.ozlan.local...[/email]
> Ingo,
>
>> 1. After deleting the text in the Editcontrol of the ComboBox and
>> entering
>> the 1st letter, ComboBox:cText contains and shows still the old deleted
>> text. Only after the second letter the content of :cText is changed. Is
>> this the intended behavior?
>
> No. It's fixed now, althought nIndex isn't update inmediately due to the
> own windows control behavior
>
>
>> 2. After selecting an item from the list ComboBox:cText does not update
>> immediately. How can I get the real text from the InplaceEdit just in
>> time?
>
> There was a bug. Now you can get it reading the property cText at any time
>
>
>> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
>> and
>> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
>> this
>> intended?
>
> You are right. Now it's fixed.
>
>
>> Please take a look in the testcode in combotest.zip
>
> Thanks for the sample and the info. Here you are the fixed module.
>
>
> --
> Regards,
>
> Jose F. Gimenez
>
>
problems with TComboBox
Hola Xevi,
no veo ninguna diferencia. Pienso que OnChange() está llamado solamente si
la posición en la lista está cambiando o no.
//---------------------------------------------------------- ----------------
EVENT OnChange( oSender, nIndex )
oSender: Referencia al objeto que dispara el evento
nIndex: Indice del elemento seleccionado
Evento que se dispara cada vez que se cambia el elemento
seleccionado
RETURN Nil
//---------------------------------------------------------- ----------------
Saludos
Ingo
"Xevi" <xevicomas@terra.es> schrieb im Newsbeitrag
news:434ea906$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>
> Ingo,
>
> Sorry, I don't English...
>
> Debes utilizar el método OnChange() del ComboBox...
> Te adjunto el Test.
>
>
> Regards,
> Xevi.
>
>
> "Ingo" <ing.jh@web.de> escribió en el mensaje
> news:[email=434ea5d3@ozsrvnegro.ozlan.local...]434ea5d3@ozsrvnegro.ozlan.local...[/email]
>>
>> Hello ,
>> TComboBox (using the new obj files) causes me more problems:
>>
>> 1. After deleting the text in the Editcontrol of the ComboBox and
>> entering
>> the 1st letter, ComboBox:cText contains and shows still the old deleted
>> text. Only after the second letter the content of :cText is changed. Is
>> this the intended behavior?
>>
>> 2. After selecting an item from the list ComboBox:cText does not update
>> immediately. How can I get the real text from the InplaceEdit just in
>> time?
>>
>> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
>> and
>> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
>> this
>> intended?
>>
>> Please take a look in the testcode in combotest.zip
>>
>> Regards
>>
>> Ingo
>>
>>
>>
>
>
>
no veo ninguna diferencia. Pienso que OnChange() está llamado solamente si
la posición en la lista está cambiando o no.
//---------------------------------------------------------- ----------------
EVENT OnChange( oSender, nIndex )
oSender: Referencia al objeto que dispara el evento
nIndex: Indice del elemento seleccionado
Evento que se dispara cada vez que se cambia el elemento
seleccionado
RETURN Nil
//---------------------------------------------------------- ----------------
Saludos
Ingo
"Xevi" <xevicomas@terra.es> schrieb im Newsbeitrag
news:434ea906$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>
> Ingo,
>
> Sorry, I don't English...
>
> Debes utilizar el método OnChange() del ComboBox...
> Te adjunto el Test.
>
>
> Regards,
> Xevi.
>
>
> "Ingo" <ing.jh@web.de> escribió en el mensaje
> news:[email=434ea5d3@ozsrvnegro.ozlan.local...]434ea5d3@ozsrvnegro.ozlan.local...[/email]
>>
>> Hello ,
>> TComboBox (using the new obj files) causes me more problems:
>>
>> 1. After deleting the text in the Editcontrol of the ComboBox and
>> entering
>> the 1st letter, ComboBox:cText contains and shows still the old deleted
>> text. Only after the second letter the content of :cText is changed. Is
>> this the intended behavior?
>>
>> 2. After selecting an item from the list ComboBox:cText does not update
>> immediately. How can I get the real text from the InplaceEdit just in
>> time?
>>
>> 3. The returnvalue of ComboBox:FindString(ComboBox:cText) begins with 0
>> and
>> not with 1, on the other side ComboBox:GetText(nItem) begins with 1. Is
>> this
>> intended?
>>
>> Please take a look in the testcode in combotest.zip
>>
>> Regards
>>
>> Ingo
>>
>>
>>
>
>
>
problems with TComboBox
Ingo,
I've checked it again and:
> 1. now ComboBox:nIndex will be not aktualized when you select an item of
> the list
Please, try with the attached sample. Notice that when you select an item
from the list, the event which is fired is OnChange, not OnEditUpdate nor
OnEditChange. And OnChange receives 3 params: oSender, nIndex and nOldIndex,
but it's fired before nIndex is changed; the reason is that if you return
..F. from this event, the combo doesn't change.
However, if you use a csDROPDOWN combo that allow the user to type anything
in it, then IMO, you should not worry about nIndex at all. You should
consider to deal only with cText. And if you are interested in if the typed
string is in the list, then you can use :FindString() or a simple AScan() to
locate it.
> 2. ComboBox:GetText(nItem) returns not the complete element but only the
> first letter. The returned string is the same like ComboBox:cText
Sorry, I'm not able to reproduce this behavior. In the attached sample,
cText and GetText() return always the exact string item.
--
Regards,
Jose F. Gimenez
I've checked it again and:
> 1. now ComboBox:nIndex will be not aktualized when you select an item of
> the list
Please, try with the attached sample. Notice that when you select an item
from the list, the event which is fired is OnChange, not OnEditUpdate nor
OnEditChange. And OnChange receives 3 params: oSender, nIndex and nOldIndex,
but it's fired before nIndex is changed; the reason is that if you return
..F. from this event, the combo doesn't change.
However, if you use a csDROPDOWN combo that allow the user to type anything
in it, then IMO, you should not worry about nIndex at all. You should
consider to deal only with cText. And if you are interested in if the typed
string is in the list, then you can use :FindString() or a simple AScan() to
locate it.
> 2. ComboBox:GetText(nItem) returns not the complete element but only the
> first letter. The returned string is the same like ComboBox:cText
Sorry, I'm not able to reproduce this behavior. In the attached sample,
cText and GetText() return always the exact string item.
--
Regards,
Jose F. Gimenez
problems with TComboBox
Ingo,
oops, sorry... the sample
Regards,
Jose F. Gimenez
Attached files test.zip (1.9 KB)Â
oops, sorry... the sample

Regards,
Jose F. Gimenez
Attached files test.zip (1.9 KB)Â
problems with TComboBox
Jose,
sorry I thought GetText(nItem) returns the item of the list and not
ComboBox:cText:
//---------------------------------------------------------- ----------------
METHOD GetText( nItem )
nItem: Posición del elemento en la lista
cText: Texto del elemento
Devuelve un elemento de la lista de valores
RETURN cText
//---------------------------------------------------------- ----------------
Please try this, put "antonia" (lower case) in:
ComboBox:cText has the string "antonia" - this is correct
FindString returns 1 - this is correct too
GetText(1) returns "antonia" - the same string like cText but it should
be "Antonia", because ComboBox:aItems[1] is "Antonia" not "antonia" - am I
wrong?
Regards
Ingo
sorry I thought GetText(nItem) returns the item of the list and not
ComboBox:cText:
//---------------------------------------------------------- ----------------
METHOD GetText( nItem )
nItem: Posición del elemento en la lista
cText: Texto del elemento
Devuelve un elemento de la lista de valores
RETURN cText
//---------------------------------------------------------- ----------------
Please try this, put "antonia" (lower case) in:
ComboBox:cText has the string "antonia" - this is correct
FindString returns 1 - this is correct too
GetText(1) returns "antonia" - the same string like cText but it should
be "Antonia", because ComboBox:aItems[1] is "Antonia" not "antonia" - am I
wrong?
Regards
Ingo
problems with TComboBox
Ingo,
> Please try this, put "antonia" (lower case) in:
> ComboBox:cText has the string "antonia" - this is correct
> FindString returns 1 - this is correct too
> GetText(1) returns "antonia" - the same string like cText but it should
> be "Antonia", because ComboBox:aItems[1] is "Antonia" not "antonia" - am I
> wrong?
You are right. I didn't understand the problem before. Attached is the fixed
module.
Thanks for your feedback.
--
Regards,
Jose F. Gimenez
Attached files ComboBox.zip (5.7 KB)Â
> Please try this, put "antonia" (lower case) in:
> ComboBox:cText has the string "antonia" - this is correct
> FindString returns 1 - this is correct too
> GetText(1) returns "antonia" - the same string like cText but it should
> be "Antonia", because ComboBox:aItems[1] is "Antonia" not "antonia" - am I
> wrong?
You are right. I didn't understand the problem before. Attached is the fixed
module.
Thanks for your feedback.
--
Regards,
Jose F. Gimenez
Attached files ComboBox.zip (5.7 KB)Â