Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditionally display ComboBox drop-arrow
Message
From
07/08/2004 08:29:58
 
 
To
06/08/2004 12:11:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00931345
Message ID:
00931528
Views:
24
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform