Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe and Tab Sequence
Message
 
 
À
21/07/2005 18:06:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01034794
Message ID:
01034951
Vues:
27
>Where is the ListIndex setting, via
>ListIndex
>or
>Value
>or
>Controlsource ?

Controlsource is the table's (view) field.

I've changed your code a little bit, form appeared with empty combo, though I'm sitting on a record with a value.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


DEFINE CLASS form1 AS form


	Top = 2
	Left = 3
	Height = 250
	Width = 446
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT pageframe1 AS pageframe WITH ;
		ErasePage = .T., ;
		PageCount = 2, ;
		Top = 26, ;
		Left = 20, ;
		Width = 394, ;
		Height = 189, ;
		Name = "Pageframe1", ;
		Page1.Caption = "Page1", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Page2", ;
		Page2.Name = "Page2"


	PROCEDURE pageframe1.Page1.Activate
		KEYBOARD '{TAB}' PLAIN CLEAR
	ENDPROC

	PROCEDURE pageframe1.Page2.Activate
		KEYBOARD '{TAB}' PLAIN CLEAR
	ENDPROC

	PROCEDURE init
		this.pageframe1.page1.AddObject("COMBO1","COMBO")
		this.pageframe1.page1.COMBO1.Move(40,50)
		this.pageframe1.page1.COMBO1.Visible = .T.
		this.pageframe1.page2.AddObject("text1","textbox")
		this.pageframe1.page2.text1.Move(150,40)
		this.pageframe1.page2.text1.Visible = .T.

ENDDEFINE


DEFINE CLASS COMBO AS ComboBox
	PROCEDURE Init
		USE VisCodes
		GOTO 4243
		=MESSAGEBOX(VisCodes.cCategory_Description + " " + VisCodes.cCode_value)
		SET MULTILOCKS on
		CURSORSETPROP("Buffering",5) 
		ADDPROPERTY(m.this,"Items[1]")
		SELECT cCode_Description, cCode_Value FROM VisCodes INTO ARRAY this.Items WHERE cCategory_Description like 'EVENTS%'
		this.ControlSource = 'VisCodes.cCode_value'
		this.BoundColumn = 2
		this.BoundTo = .t.
				
		this.RowSource = "this.Items"
		this.RowSourceType = 5
		*this.ListIndex = 1
	ENDPROC	
ENDDEFINE
Use your own table (any table).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform