yaniv hanya Active Member Licensed User Jul 3, 2019 #1 I have a panel that looks like a popup but even when it covers the whole screen the buttons under it work. How do I lock the entire screen below it while it appears
I have a panel that looks like a popup but even when it covers the whole screen the buttons under it work. How do I lock the entire screen below it while it appears
klaus Expert Licensed User Longtime User Jul 3, 2019 #2 You need to add an event for that panel to 'consume' the events, like: B4X: Sub Panel1_Click End Sub Upvote 0
yaniv hanya Active Member Licensed User Jul 3, 2019 #3 How do I add it if I created the panel during run time? Upvote 0
klaus Expert Licensed User Longtime User Jul 3, 2019 #4 Why do you add it during run time? You can define it in the Designer and set its Visible property. Upvote 0
yaniv hanya Active Member Licensed User Jul 3, 2019 #5 I could but I tried to do it that way. If it's hard I'll do it in the designer thenks Upvote 0
klaus Expert Licensed User Longtime User Jul 3, 2019 #6 How do you add the panel in the code? Upvote 0
yaniv hanya Active Member Licensed User Jul 3, 2019 #7 B4X: Private p As Panel B4X: p.Initialize("") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y) Upvote 0
B4X: Private p As Panel B4X: p.Initialize("") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y)
klaus Expert Licensed User Longtime User Jul 3, 2019 #8 Like this: B4X: p.Initialize("Panel1") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y) And B4X: Sub Panel1_Click End Sub Upvote 0
Like this: B4X: p.Initialize("Panel1") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y) And B4X: Sub Panel1_Click End Sub
Erel B4X founder Staff member Licensed User Longtime User Jul 4, 2019 #10 There is a small mistake here: B4X: p.Initialize("Panel1") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y) You should always set the container size before you load the layout. Otherwise features such as anchors and designer script will not work properly. Correct code: B4X: p.Initialize("Panel1") Activity.AddView(p,0,0,100%x,100%y) p.LoadLayout("SetWaterLevelLy") Upvote 0
There is a small mistake here: B4X: p.Initialize("Panel1") p.LoadLayout("SetWaterLevelLy") Activity.AddView(p,0,0,100%x,100%y) You should always set the container size before you load the layout. Otherwise features such as anchors and designer script will not work properly. Correct code: B4X: p.Initialize("Panel1") Activity.AddView(p,0,0,100%x,100%y) p.LoadLayout("SetWaterLevelLy")