📄 fstart.class
字号:
' Gambas class fileSTATIC PUBLIC SUB Main() DIM myForm AS Form myForm = NEW FStart myForm.ShowENDPUBLIC myThings AS CollectionPUBLIC myThing AS CThingPUBLIC SUB btnCreate_Click()'creating objects and add to collection DIM i AS Integer myThings = NEW Collection FOR i = 1 TO 7 myThing = NEW CThing myThing.Name = "ThingName-" & CStr(i) myThing.X = i myThing.Y = i myThing.ID = i myThings.Add (myThing, CStr(myThing.ID)) NEXT 'show the collectionmembers in treeview tvThings.Add("root", "myThings") FOR EACH myThing IN myThings tvThings.Add(myThing.ID, myThing.Name, , "root" ) tvThings.Add(myThing.ID & "Name", "Name= " & myThing.Name, , CStr(myThing.ID)) tvThings.Add(myThing.ID & "X", "X= " & myThing.X, , CStr(myThing.ID)) tvThings.Add(myThing.ID & "Y", "Y= " & myThing.Y, , CStr(myThing.ID)) tvThings.Add(myThing.ID & "ID", "ID= " & myThing.ID, , CStr(myThing.ID)) NEXTEND
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -