Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box and Mouse Click
Message
De
21/02/2008 07:04:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/02/2008 02:49:43
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01294609
Message ID:
01294662
Vues:
23
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>I'm sure this is a simple question but I'm struggling.
>
>I have a combo box when the user tabs into the combo, then hits f4 the combo list drops down the user can then use the down and up arrows to pick the correct value. When they hit enter it populates the displayvalue and tabs to the next field. Nothing particularly complicated about that, but I would also like to have the same usability for the mouse.
>
>So a user enters the field , either by tab or direct mouse click, clicks on the drop down arrow and then selects the value they want at this point it should complete the displayvalue and tab to the next field. This bit isnt working I tried adding the code to the interactive change but then when you use a keyboard and scroll down through the values the interactive change keeps firing!
>
>I'm sure this is'nt as difficult as I'm making it and any suggestions\advise would be greatly appreciated.
>
>Thanks
>
>Jon

Returning 1 from valid would do it for both. ie:
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  DataSession = 2
  Add Object myCombo As ComboBox With ;
    left = 10, Top = 10, Width = 250, ;
    RowSourceType = 3, ;
    RowSource = "Select Company as DispVal, * from ('"+_samples+"data\customer')"+;
    " into cursor crsSample nofilter"

  Add Object myTextBox1 As TextBox With Left = 270, Top = 10
  Add Object myTextBox2 As TextBox With Left = 270, Top = 40

  Procedure myCombo.Valid
    Return 1
  Endproc
Enddefine
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform