I searched and saw another post on this from November, but I’m not sure I saw a solution. Component labels are using waaaay to much real estate in portrait mode, any way to shrink the ‘padding’ (margins) as indicated below:
Have you tried using the role text
for the label. I think that’s what’s for - and then change the fontsize if it’s too small…
I used a Blank Form as I normally do, researching roles and such, I see that they are not available with Blank Forms.
Oh I so it’s not the Label
that’s the problem it’s the BlankPanel
Have you checked the spacing_above
and spacing_below
for self
in the BlankPanel
?
I created a new form, custom html, intending to move all my components. I created the new form, added a label, and the roles says “not available”. I created an entirely new app, created a form, custom html, added a label, went to ‘roles’ - and it too says ‘not available’. Then I created a new form of the type ‘standard page’ - it too says role is ‘not available’
Are you referring to the role of a label? They have roles that should be accessible. When you see that the role is not available, are you currently highlighting the label component?
yes, it’s the only component. I created an entirely new app, created a form, added a label, checked - and it says under role ‘not available’
I believe something else is wrong, I added a form and selected the ‘Standard Form’ option, which normally would display a header and menu sidebar, mine does not. And of course, role is not available.
Can you clone this app and tell me what you see for the label’s role when selected?
https://anvil.works/build#clone:E7O2SEPQG2RGZ6OH=N3ZMIWXNZA7VHJ322FC54QNP
Did that, it seems fine:
Great. This may be a bug due to copying components. I have seen strange behaviour now and then when copying components. Or it may be due to choosing a different form type (I understand you said you selected the standard one though).
Here’s a clone of my app, problem is you would need my local .csv file. From the startup page, hit startup, and select the .csv file. The output is a .pdf file for each ‘row’ in the .csv
yes, I created an entirely new app, so right now, I can’t even create an entirely new app, form, components, and use roles at all. Nothing I do makes them available…
Which label is misbehaving? I shouldn’t need to run the app to assess this correct?
edit: ahh, it seems any of them will do
Just to see what is what, I closed all browser windows, cleared cached.
Opened a browser, logged into Anvil, Created an app with the material design theme. Created a form with Custom HTML. Added a label - role not available
Ahh, for what it is worth this does not occur with the material design (and possibly others). You chose a Custom HTML app though I believe based on the clone you shared (correct?). Apparently you cannot use roles for labels in that app type.
Moving back to my original question, using a blank form, there seems to be no way to avoid the excessive padding on labels *unless you use custom html or the standard page
What I don’t understand is why in my instance, these other form types don’t work as expected, since in this particular app, none of the form types will allow roles. I wonder if once you create a blank form, the entire app is hosed w/r to using roles.
Just to clarify as there was some confusion above. Are you referring to the spacing above and below a label component?
I guess starting with a material design and choosing a blank panel as a form will still allow you all the flexibility of roles.
Would this work for you?
no, not referring to the space above and below a label. I have that set to ‘none’ throughout.
I’m referring specifically the ‘padding’ or internal margins of the label itself. For example, in the screengrab below, I have to use three labels, and I want the height of the label components themselves, to be less. The white space above and below ‘INDUSTRY RANKINGS’ is excessive. When you add that padding from all three labels (because I want different font sizes…), then that text block is taking up too much vertical space. This is true for the entire page, so the .pdf ends up being two pages - not what I desire.
As a test, I create a new app, Custom HTML.
Then I create a new Form, again, Custom HTML.
I add a single Label Component.
I highlight that component, look at properties, and role is not available