How To Change Visual Style of Button?

If you want to set it at design time (i.e., in the IDE), then you can use the Properties panel in the visual designer. (You may have to click “More” in order to see that particular setting). See https://anvil.works/docs/editor .

If you want to change it dynamically (i.e., via running code), then check out https://anvil.works/docs/api/anvil#Button_attributes . A button is a Python object, so you can alter its properties directly, via very-straightforward Python code.

I might also suggest Searching Anvil’s Online Help :wink:. A lot of work has gone into Anvil’s documentation, so it’s definitely worth checking out.

2 Likes