Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview:
Message
 
To
30/06/2005 09:19:00
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026975
Message ID:
01027659
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
Here what I invent ;o)))) not very beautiful, but when I go home I'll try to think of better decision:
PUBLIC oform1

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


	**************************************************
*-- Form:         form1 (d:\all_zapl\test.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   06/30/05 04:38:09 PM
*
DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	Height = 651
	Width = 363
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT olecontrol1 AS olecontrol WITH ;
		Top = 29, ;
		Left = 31, ;
		Height = 599, ;
		Width = 314, ;
		Name = "Olecontrol1"


	PROCEDURE Init
		thisform.olecontrol1.Nodes.Add(,1,"MAIN","Main Node")
		FOR asd = 1 TO 10
		    thisform.olecontrol1.Nodes.Add("MAIN",4,TRANSFORM(asd)+"_","Node "+TRANSFORM(asd))
		NEXT
		FOR asd = 1 TO 10
		    IF asd % 2 == 0
		       thisform.olecontrol1.Nodes.Add(TRANSFORM(asd)+"_",4,TRANSFORM(asd+50)+"_","Child Node "+TRANSFORM(asd))
		    ENDIF
		NEXT
	ENDPROC


	PROCEDURE olecontrol1.NodeClick
		*** ActiveX Control Event ***
		LPARAMETERS node
		IF ISNULL(node.Child)
		   IF ISNULL(node.Next)
		      this.SelectedItem = node.Parent
		   ELSE
		      this.SelectedItem = node.Next
		   ENDIF
		   this.NodeClick(this.SelectedItem)
		ENDIF
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform