Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Hi Brad,
I've found that these combo boxes work best with arrays.
Use your sql statement to populate an intrinsic array like this.ialist,
then when you type something not in the array into the box, re-dim the
array and insert the value with code something like this:
local lctext,lcexact,lnarrlen
lctext=iif(empty(this.value),alltrim(this.text),alltrim(this.value))
lcexact=set("exact")
lnarrlen=0
set exact on
with this
if !empty(lctext)
if ascan(.ialist,lctext)=0
lnarrlen=alen(.ialist)+1
dimension .ialist[lnarrlen]
ains(.ialist,1)
store alltrim(lctext) to .ialist[1]
.numberofelements=lnarrlen+1
endif
* if alltrim(this.text)!=lctext
this.value=lctext
* endif
endif
endwith
set exact &lcexact
return
The combo box will see the new value in its list and display it. Otherwise, it just ignores it.
Luke
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement