News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Main Menu

Multiline button text

Started by slarge, October 26, 2021, 04:43:58 PM

Previous topic - Next topic

slarge

I want to place a large button with two lines of text on it. Is there any way to include a line break in the button text to split it into multiple lines? And if not, is there another way to achieve this?

Rudolph

That depends on which EVE you are using.
BT81x have OPT_FILL: "breaks the text at spaces into multiple lines, with maximum width set by CMD_FILLWiDTH."

With FT8xx however you could just use print multiple lines of text over an empty button.
Just make sure to use the same tag.

CLEAR(1, 1, 1)
COLOR_RGB(255, 255, 255)
TAG(20)
CMD_BUTTON(200, 200, 100, 100, 27, 0, "")
CMD_TEXT(250, 220, 28, OPT_CENTERX, "Text1")
CMD_TEXT(250, 250, 28, OPT_CENTERX, "Text2")

Or skip the button entirely and draw two rectangles on top of each other with different colors and
the second one smaller to get a frame and write text over it.

Or well, use a picture.