Checkbox with multiline label

I’m adding spanish localisation to my app. One checkbox has a label that in spanish would be 2 lines of text. But when I make the checkbox higher the checkbox shows up in the middle and the label doesn’t do multiline at all.

Do I need to do my own multiline checkbox or is there a simpler way?

Have you tried to add the LineBreak explicitly?

MyCheckbox.Caption = "Text Line 1" + EndOfLine + "Text Line 2"

That might fix the text part of the checkbox. But the vertical alignment of the checkbox also isn’t correct. I don’t think I can control that.

What about an empty caption and separated Label control with .Multiline = True ?

If you click on the label of the checkbox then the state of the checkbox is changed, too. That would be the simple workaround.

If you want this, add the extra switch to the label, like:

Function MouseDown(X As Integer, Y As Integer) Handles MouseDown as Boolean CheckBox1.Value = Not CheckBox1.Value End Function

And yes, a multiline ability to the check box caption, should be great.

Well… the “Layout Preview” in the XojoIDE seems to vertically align the Checkbox and doesn’t match the look&feel of the Runtime.
In a built .app the Checkbox seems to be aligned with “Line 1” (at least on macOS).

or check box + a label one row below.
or using a Container Control to reuse this.

I think I read somewhere that the Apple Human Interface guidelines state that multiline labels for checkboxes are frowned upon, that’s why the native checkbox doesn’t support them. You need to roll your own.

§$%& forum. Why is my post gone?

Anyways. Thanks, guys, I’ll go with the checkbox and label.

why is it frowned upon??

Couldn’t find an “Apple reason” TM. https://developer.apple.com/design/human-interface-guidelines/macos/buttons/checkboxes/