Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pageframe and Tab Sequence
Message
 
 
To
21/07/2005 18:06:03
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01034794
Message ID:
01034951
Views:
25
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform