Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ComboBoxes start reprogamming themselves?
I've got 3 Comboboxes on a contianer class on the second page of a form. The combos item lists come from an array called aItems. I build this array in the Init Event of the each combo using a Select SQl command. The second two boxes select statements contain a "when" pertaining to the DisplayValue of the first box. Now this was working correctly just 2 hours ago, and my combos would load up on the form with the displayvalue populated. Now they don't, and thats because the display value of the first box doesn't appear to be populated until we change to the second page of the form. I'm not sure whats happening but if you're really smart you could probably figure this out with more info. Here's a sample of what my code might be:
PROCEDURE box1.Init && First Box
DoDefault()
WAIT WINDOW 'state'
SET FILTER TO
SELECT field1,;
field2, ;
LOWER(field1) ;
from table1 ;
WHERE EMPTY(field3) AND EMPTY(field4);
order by 3 ;
into array This.aItems
ENDPROC
PROCEDURE box2.Init &&Second box
Dimension This.aItems[1,3]
This.aItems=''
SELECT field1,;
field2, ;
LOWER(field1) ;
from table1 ;
WHERE EMPTY(field3) AND EMPTY(field4) AND;
ALLTRIM(field5) == ALLTRIM(This.Parent.box1.displayvalue);
order by 3 ;
into array This.aItems
This.NumberofElements=ALEN(This.aItems,1)
This.Refresh()
ENDPROC
Suivant
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