Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box Issue/Question VFP8
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combo Box Issue/Question VFP8
Divers
Thread ID:
00824566
Message ID:
00824566
Vues:
61
Normally I use the combobox in a dropdown list tied to a database, but now I have a form with a combobox with the style set to 0-DropDown Combo:

Style: 0-DropDown Combo
BoundColumn=1
BoundTo: .f.
ControlSource: thisform.frmCategory (text)
NumberOfElements: =alen(taskCategories)
RowSource: TaskCategories
RowSourceType: 5 - Array
* FORM INIT *
parameters tcMode,tcSubject,tdDate,tiPriority,tcCategory,tiPercent,tcNotes,tiTaskID 

*****************************************************************
* Get a listing of all categories to display in the ComboBox
* And load into an array, Insert a blank value at the top of the 
* array stack.
*****************************************************************
PUBLIC  ARRAY TaskCategories[1]
IF SQLEXEC(gnConnHandle,"Select Distinct category from coTaskList order by category","CatList")=1
	select Category from catList ORDER BY Category into array TaskCategories
	DIMENSION TaskCategories[_tally+1]
	AINS(TaskCategories,1)
	TaskCategories[1]=SPACE(50)
ELSE
	TaskCategories[1]=SPACE(50)
ENDIF 


thisform.frmcategory=tcCategory
Using the Command window, I can see that the array has 3 entries (as it should):

taskCategories[1]=" "
taskcategories[2]="IMP "
taskcategories[3]="TESTING "

But when I run the form, and click on the dropdown, it shows only one entry and that is the blank one. In addition, it is not populating the value at the beginning when the form shows up, even though the control source thisform.frmCategory has the value.

Thanks for any help

Kirk
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform