fstart.class
来自「Gambas is a graphical development enviro」· CLASS 代码 · 共 38 行
CLASS
38 行
' 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 + =
减小字号Ctrl + -
显示快捷键?