Jabaco by default has no collection of Forms.
It has no collection of Controls either.
If you want to enumerate Forms or Controls you have to define the collection yourself
and add all collection items during initialization.
Example for Controls:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
' keep all user controls in a list
Private ucList As java#util#ArrayList
Public Sub Form_Load()
myForm1 = Me ' cf. mdlGlobal variable
ucList = New java#util#ArrayList ' list of user controls
End Sub
Public Sub cmdReset_Click()
Dim i As Integer
For i = 0 To ucList.size - 1
' all our usercontrols implement interface IUCreset
Cast(ucList.get(i), IUCreset).reset
Next i
End Sub
' called out of the usercontrol initialization
Public Sub registerUsercontrol(uc As IUCreset)
ucList.add uc
End Sub
|
Source snippet of a usercontrol:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
|
Implements IUCreset
Private initCalls As Integer
Public Sub Init()
initCalls = initCalls + 1
If initCalls = 1 Then
myForm1.registerUsercontrol Me
End If
End Sub
|
Greetings
A1880