Enum possible values

In the API reference in many cases the possible values of a property are an enum.
But the possible values are not specified
For example, what are the possible values for the button align property?
I guessed that it would be along the right, left center, but is there a discerption in the docs? link to the corelating CSS enums?

2 Likes

Welcome to the Forum!

This is one of my (few) pet peeves as well. There is an assumption that you know the HTML and/or CSS values to put here, including all the little syntax nits. Of course, the big reason for many people to use Anvil is that they don’t know HTML or CSS, and don’t want to have to know, either.

In most (not all) cases you can find the valid values by looking at the Properties panel on the form editor.

In the case you mentioned, the align property of a Button, the valid values are the 4 listed:

image

1 Like

You’re right. I must have been thinking of the more complicated cases, like border?

1 Like

Hi @eliyahu.arlev and welcome to the forum!

I’ll add it to our list to improve the descriptions of those types of values in the API documentation.

1 Like