LiveCode LessonsLiveCode LessonsHow To - Step-By-Step Guides To Tasks In LiveCodeUsing WidgetsHow to add a button to your app that always stays pinned to the bottom corner

How to add a button to your app that always stays pinned to the bottom corner

Sometimes you need your application to show a floating button or control at one specific spot. It could be an"Add" button at the bottom right corner for example. The problem is not all devices have the same screen dimensions and density, or it could be you want to change the window dimensions dynamically in response to user actions.  Responsive Layout can help you with this.

Create a Stack and Button

To illustrate this example let's create an empty stack (1) , then add a Power button widget (2) and edit it's style as desired.  To do this we used the Magic Palette plugin. On the Templates tab (3), make sure you have your Power button selected and double click on the template you prefer (4).

Set its Geometry

Now you have an Add button (1). On the Magic Palette we go to tab Geometry (2) and select Position fixed (3), set the distance from right (4) to 15 and the distance from bottom(5) to 15 as well,

That's it, now you have a floating Add button that will remain at 15 pixels from bottom and 15 pixels from the right of its parent (the card). Enjoy!

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.