Hi Newsgroup
I finally found the answer on:
http://www.developerfusion.co.uk/show/4665/6/
I simply had added a new tabpage to the control, but I should have used the
CreateComponent method of IDesignerHost:
Dim h As IDesignerHost =
DirectCast(GetService(GetType(IDesignerHost)), IDesignerHost)
Dim dt As DesignerTransaction = Nothing
Dim c As IComponentChangeService =
DirectCast(GetService(GetType(IComponentChangeService)),
IComponentChangeService)
'Add a new tabpage to the collection
Dim t As TabPage = Nothing
dt = h.CreateTransaction("Add Step")
t = DirectCast(h.CreateComponent(GetType(TabPage)), TabPage)
t.Text = Replace(Me.jkw.strText_StepTitle, "%nr%",
Me.jkw.tabPages.TabCount)
c.OnComponentChanging(Me.jkw, Nothing)
Me.jkw.tabPages.TabPages.Add(t)
c.OnComponentChanged(Me.jkw, Nothing, Nothing, Nothing)
Me.jkw.tabPages.SelectedIndex = Me.jkw.tabPages.TabCount - 1
dt.Commit()
Thank you for your help Brian.
Greetings Johnny
> Hi Bryan
>
[quoted text clipped - 33 lines]
> > > Thank you for your answers!
> > > Greetings Johnny