Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditionally display ComboBox drop-arrow
Message
De
07/08/2004 08:29:58
 
 
À
06/08/2004 12:11:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00931345
Message ID:
00931528
Vues:
26
This message has been marked as a message which has helped to the initial question of the thread.
Hi Curt.

I have tried Sparse, but here you either get the drop-arrow showing in all rows or no rows. I think I may be on the right track using SetAll Visible, but I have not been able to solve the problem yet.

You definitely want to leave Sparse at its default ( true ). Then you are going to need a little bit of code in the GotFocus() of the combo box. Something like this:
*** Check to see if the current control in this column
*** should be the combo. This happens when there is
*** more than 1 item in its RowSOurce
IF This.ListCount > 1
  This.Refresh()
ELSE
  This.Parent.CurrentControl = [Text1]
  NODEFAULT
ENDIF
and this in the LostFocus() of the combo:
This.Parent.CurrentControl = [Text1]
DODEFAULT()
This code goes in the Textbox in the grid column:
*** Check to see if the current control in this column
*** should be the combo box.
IF This.Parent.combo1.ListCount > 1
  *** find the description
  This.Parent.CurrentControl = [combo1]
  This.Parent.combo1.Refresh()
  NODEFAULT
ENDIF
Note that you will not see a combo box in the column until that cell gets focus.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform