Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable a row in a combobox
Message
 
 
À
29/12/2005 07:42:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01081604
Message ID:
01081606
Vues:
10
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform