Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Editing in a ComboBox
Message
De
25/12/1997 07:28:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00067877
Message ID:
00067922
Vues:
25
>In a ComboBox I have the same field as a ControlSource and as a RowSource. Is there a way I could edit the visible content of the combobox. I would like to change a value in the table using the textbox part of a combobox.
>Thank you.
Hi,
Try this after subclassing a combobox and adding the appropriate props, methods.
*Extra properties
Aliasname && Rowsource alias
Fieldname && Rowsource fieldname
*Init
This.rowsourcetype = 3
This.rowsource = [SELECT DISTINCT ]+THIS.FIELDNAME +;
[ as dummy FROM ]+this.aliasname+[ where !empty(]+THIS.FIELDNAME + ;
[) union ] +;
[SELECT this.displayvalue as dummy ] +;
[ FROM ]+this.aliasname + ;
[ INTO cursor qq order by 1 ]

*When
THIS.REQUERY
*Lostfocus
Do While occurs(" ",this.displayvalue) > 0
this.displayvalue = strtran(this.displayvalue," "," ")
Enddo
This.displayvalue = Upper(Chrtran(Alltrim(This.displayvalue),"ýi","IÝ")) && This is just for special language handling - u can remove it
this.value = this.displayvalue

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform