Add a Color line

I am new to Anvil and I am building a calendar app and underneath each date I would like to show a line that that can have different colours to show availability for that date. Let’s say green when that day is free and red for not available. Could also be an icon with limited hight. I tried using a label and change the background colour but the label can not be made 5 pixels high, it has always a default height which is to high for my application. Could you advise me how I could do this colour line.

You can change font size in the right panel, to adjust the height

Welcome to the forum!

I usually use a canvas.
You can set its height to the number of pixels and its background color to the color you like.

Another way I sometimes use in a repeating panel is the border color.
The snapshot below shows a repeating panel where the labels in the item are visible when there is text and not visible when there is no text. When there is no text, the border of the form (not the label) is gray, so it shows the line. All it’s done with databinding.

image

image

image

2 Likes

Thanks a lot for the feedback.