W WardOperationsLLC Member Licensed User Longtime User Aug 30, 2023 #1 I have an app I'm working on and can't seem to get two buttons to be sent to the back. Attached are the designer view that shows the buttons locations (btnProfile & btnExit), the view tree that shows they are sent to the back, and a picture of them showing above the cyan panel (which is pnlLogin). pnlLogin is set to move to 0,0 on app startup. That works fine, but as you ca see the buttons still show above it. I've tried everything and can't get them to go to the back. After the designer failed to do it, I uninstalled the app from the emulator thinking maybe it wasn't using the updated version. Problem persisted. I then added a couple lines of code Code: btnExit.SendToBack btnProfile.SendToBack pnlRegister.BringToFront pnlLogin.BringToFront That still didn't fix the issue. I thought maybe sleeping for a couple seconds before calling them would help. It didn't. I've walked through the code slowly and it's definetely running that code, but doesn't seem to be doing anything. Can someone point me in the direction to fix this? Attachments AppView.PNG 381.6 KB · Views: 383 ViewsTree.PNG 9.4 KB · Views: 471 DesignerView.PNG 29.4 KB · Views: 431
I have an app I'm working on and can't seem to get two buttons to be sent to the back. Attached are the designer view that shows the buttons locations (btnProfile & btnExit), the view tree that shows they are sent to the back, and a picture of them showing above the cyan panel (which is pnlLogin). pnlLogin is set to move to 0,0 on app startup. That works fine, but as you ca see the buttons still show above it. I've tried everything and can't get them to go to the back. After the designer failed to do it, I uninstalled the app from the emulator thinking maybe it wasn't using the updated version. Problem persisted. I then added a couple lines of code Code: btnExit.SendToBack btnProfile.SendToBack pnlRegister.BringToFront pnlLogin.BringToFront That still didn't fix the issue. I thought maybe sleeping for a couple seconds before calling them would help. It didn't. I've walked through the code slowly and it's definetely running that code, but doesn't seem to be doing anything. Can someone point me in the direction to fix this?
Solution Erel Aug 31, 2023 Buttons have an internal elevation of 2dip. You can put a panel above a button and set its elevation to 2dip+.
Buttons have an internal elevation of 2dip. You can put a panel above a button and set its elevation to 2dip+.
W WardOperationsLLC Member Licensed User Longtime User Aug 30, 2023 #2 Still don't know what the issue is/was, however I got around it by making the buttons image views instead of buttons. Upvote 0
Still don't know what the issue is/was, however I got around it by making the buttons image views instead of buttons.
Erel B4X founder Staff member Licensed User Longtime User Aug 31, 2023 #3 Buttons have an internal elevation of 2dip. You can put a panel above a button and set its elevation to 2dip+. Upvote 1 Solution
Buttons have an internal elevation of 2dip. You can put a panel above a button and set its elevation to 2dip+.
W WardOperationsLLC Member Licensed User Longtime User Aug 31, 2023 #4 Quick test shows that works. Thanks Erel! Upvote 0