This is a little curious. I have TabPanel1 with two Tabs (DesktopTabPanel) and a button (DesktopButton) in my window. In the Button1.Pressed event I have the following code:
Var ctrl As New DesktopButton
ctrl.Caption = "Hello"
ctrl.Width = 80
ctrl.Height = 20
ctrl.Left = 20
ctrl.Top = 20
ctrl.Visible = True
ctrl.Parent = TabPanel1
ctrl.PanelIndex = 1
Self.AddControl(ctrl)
The button is not placed inside the TabPanel (2nd Tab), but above it.
Does anyone have an idea how to make this work correctly?