Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display combo with no selection
Message
From
28/06/2005 10:53:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026750
Message ID:
01027056
Views:
12
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform