Setting Dock or Anchor properties to TabControl

corwin42

Expert
Licensed User
Longtime User
Hi!

I try to set a Dock=DockStyle.Fill property to a TabControl with door.library to make it adjust its size automatically to the size of its parent panel. This does not work and I think this is because a TabControl consists of a Panel and a TabControl. I think I have to set the property to both objects (the panel and the tabcontrol) but I don't know how to access the panel control.

Any ideas how to set properties to the (internal) parent panel of the TabControl?

Thanks,
Markus
 

corwin42

Expert
Licensed User
Longtime User
Arg, I think its too late. Just found it out myself and it is very easy:

B4X:
doorobj.FromControl(tabcontrol.ControlRef)
doorobj.Value = doorobj.GetProperty("Parent")
... and doorobj Points to the tabcontrols internal panel.

Greetings,
Markus
 
Top