C Cor Active Member Licensed User Longtime User Apr 26, 2011 #1 I want to show a panel and later add views to it but pnl.setlayout gives ->null pointer exception B4X: dim pnl as panel Sub showPanel pnl.Initialize("") pnl.SetLayout(5%x, 0%y, 60%x, 40%y) ' null pointer exception end sub
I want to show a panel and later add views to it but pnl.setlayout gives ->null pointer exception B4X: dim pnl as panel Sub showPanel pnl.Initialize("") pnl.SetLayout(5%x, 0%y, 60%x, 40%y) ' null pointer exception end sub
C Cor Active Member Licensed User Longtime User Apr 26, 2011 #2 When pnl created with designer setlayout will not give error but does not creates new layout Upvote 0
stevel05 Expert Licensed User Longtime User Apr 27, 2011 #3 Just a thought, but does it make any difference if you use 0 instead of 0%y? Steve Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 27, 2011 #4 You should first add the view to the activity or parent panel. It has no layout before that. Upvote 0