grant1842 Active Member Licensed User Longtime User Feb 24, 2014 #1 I have a TabHost with one tab and a panel for the content. When I try to log the Panel.Left it gives me a ClassCastException error. I'm trying to dynamically create and add controls to the panel and keep them aligned properly. Code: Dim p As Panel p.Initialize("") thAddCustomer.AddTab2("test",p) Log(p.Left) Last edited: Feb 24, 2014
I have a TabHost with one tab and a panel for the content. When I try to log the Panel.Left it gives me a ClassCastException error. I'm trying to dynamically create and add controls to the panel and keep them aligned properly. Code: Dim p As Panel p.Initialize("") thAddCustomer.AddTab2("test",p) Log(p.Left)
Erel B4X founder Staff member Licensed User Longtime User Feb 24, 2014 #2 The panel layout is a special type of layout that makes it stretch to fill the tab page. You should use TabHost.AddTab and add a layout file instead of a panel. In the designer script of this layout file you can do whatever you like to correctly resize the layout. Upvote 0
The panel layout is a special type of layout that makes it stretch to fill the tab page. You should use TabHost.AddTab and add a layout file instead of a panel. In the designer script of this layout file you can do whatever you like to correctly resize the layout.
grant1842 Active Member Licensed User Longtime User Feb 24, 2014 #3 Would that still work if I was loading the controls onto the tab layout dynamically? Upvote 0
DonManfred Expert Licensed User Longtime User Feb 25, 2014 #4 You have a layout which can be used like any other layout used with LoadLayout. So you even can dynamically load a other layout to the tab if you want. Or put any view on the panel in this layout. whatever. I vote for YES Upvote 0
You have a layout which can be used like any other layout used with LoadLayout. So you even can dynamically load a other layout to the tab if you want. Or put any view on the panel in this layout. whatever. I vote for YES
grant1842 Active Member Licensed User Longtime User Feb 26, 2014 #5 Thank you guys very kindly for the help. Upvote 0