
Changing SSTab-tab in Form Load
Hi everyone,
I have a problem which I think has to do with the behaviour of SSTab.
I have a form with a SSTab control. In the tabs I want to create a
number of picture or image controls. The number of controls and their
positions are dynamic. Some of them should be put in tab 1, others in
tab 2 etc. To create new controls I have a unvisible picture/image
control-array containg only one element. I use this as a template and
create new controls by calling Load aPicture(ix) where ix is one higher
than the actual numbers of controls in the array.
The problem is in which tab the control is put. I try to change to
correct tab with SSTab1.Tab = <tab> before I create each control. When I
try to do all this in the Form.Load event it doesn't work - all controls
are put in the first tab. (the control-array is located on first tab at
design time) If I do it in the Form-Initialize it works, but then I get
a lot of other problems (one of them is after unloading the form, the
Initialize event is not executed the second time I open the form)
Does anyone have an idea why this doesn't works in Form.load?
ix = 0
While <more controls to create>
'Set correct tab (some controls on each tab)
SSTab1.Tab = <tab>
'Create a new picture control
Load aPicture( ix)
'Position the control - make it visible etc
'...
If <no more controls> Then
Exit Do
End If
Wend
Any help is appreciated
Best regards
Valle