Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable a row in a combobox
Message
 
 
To
29/12/2005 07:42:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01081604
Message ID:
01081606
Views:
8
This message has been marked as the solution to the initial question of the thread.
It's covered in the help for AddItem. Prefix the item you want to disable with "\".
PUBLIC ofrmListExamples
ofrmListExamples=NEWOBJECT("frmListExamples")
ofrmListExamples.Show
RETURN

DEFINE CLASS frmListExamples AS form

 DataSession = 2
 Top = 0
 Left = 0
 Height = 262
 Width = 325
 Caption = "List and ListItem Array Example"
 Name = "frmListExamples"


 ADD OBJECT cbolistgood AS combobox WITH ;
  ColumnCount = 3, ;
  ColumnWidths = "100,100,50", ;
  Height = 22, ;
  Left = 111, ;
  Sorted = .T., ;
  style = 2, ;
  TabIndex = 2, ;
  Top = 86, ;
  Width = 147, ;
  Name = "cboListGood"


PROCEDURE cbolistgood.Init
  WITH This
   .AddItem( 'Cleveland' )
   .AddItem( 'Buffalo' )
   .AddItem( 'Milwaukee' )
   .AddItem( '\International Falls' )
  ENDWITH
 ENDPROC

ENDDEFINE
>
>I'm filling up a combobox with 5 elements. Now i want that the 4th element can't be selected by the user. Is that possbible ?
>
>thnx
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform