Hi Thunk Tank
Is there a way to make labels dynamic?
Meaning if there isn’t any data in the label it disappears pushing up other elements in its place up the screen to make it look neater
At the moment when my labels dont contain data it leaves a nice big gap on screen until the next label appears further down the page
Many thanks
Mike
There isn’t really any way to make it do that automatically, but you can do it like this. Say, for example, you have a label that has a height of about 15 pixels. You can either:
- Store your components in a layout (Drag and Drop builder)
- Show and hide a label (Snap to Place builder)
Click on one of the arrows to see which one helps you:
Layout Component [DnD]
- Firstly, DO NOT put your Label Component in your Layout Component
- Put all the other components you want to move down if there is text in the label
- Then form your code like so:
Show and Hide Label [StP]
- In the Design Panel, put the Label Component to the very top, just under the Page Component (so that it will go to the top)
- Set the visibility to false

- Set a condition (if statement) to do whatever, then switch the visibility to be true
From what I know, in Snap to Place, when it is hidden it should be 1px, but when it’s shown, it’s the regular size, so I think it should shift.
Hope one of these helped!
nice play on the shark tank reference
1 Like
Thanks Krishaan, I’ll give it a go.
1 Like