Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display combo with no selection
Message
De
28/06/2005 10:53:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01026750
Message ID:
01027056
Vues:
13
>>I don't know. Download Foxyclasses sample and test there. MoverListXX sample has 4 combos and all of them have rowsourcetype=3. Ctrl+0 removes selection.
>>Cetin
>
>It's compiled with VFP6. I have 8 and 9 on this PC. I don't want to download the full version. What can I do?

Build an exe from this one and test:
oForm = Createobject('myForm')
oForm.Show
READ events

Define Class myForm As Form
  Add Object myCombo As ComboBox With Style=2
  Add Object myButton As CommandButton With Caption="Reset",Top=50
  Procedure Load
    Create Cursor myCursor (cUserID c(10), cUSerName c(10))
    For ix=1 To 10
      Insert Into myCursor Values ("",Sys(2015))
    Endfor
    For ix=1 To 10
      Insert Into myCursor Values (Sys(2015),Sys(2015))
    Endfor
  Endproc
  Procedure Init
    With This.myCombo
      .RowSourceType = 3
      .RowSource = ;
        "select cUserName,cUserID from myCursor"+;
        "  union "+;
        "select '--None--' as cUserName,Chr(0) as cUserID from myCursor"+;
        " order by 1 into cursor _users"
      .BoundColumn = 2
      .ListIndex = 0
    Endwith
  Endproc
  Procedure myButton.Click
    This.Parent.myCombo.ListIndex = 0
  ENDPROC
  PROCEDURE queryunload
    CLEAR events
  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