Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are line breaks in tooltips shown consistently across platforms in SWT

Tags:

swt

I would like to have a control with a two-line tooltip. For example a Label:

Label label = new Label( parent, SWT.NONE );
label.setText( "label text" );
label.setToolTipText( "one line\nsecond line" );

The documentation does not state anything regarding line breaks, however, on Windows, the tooltip shows two lines like desired:

Now, I would like to know how multi-line tooltips are shown on other platforms, in particular, Gtk3/Linux and macOS.

like image 380
Rüdiger Herrmann Avatar asked Oct 15 '25 23:10

Rüdiger Herrmann


1 Answers

To summarize what @greg-449 and @Nobody said:

Line breaks in SWT tooltips appear consistently across major platforms: Windows, macOS, and Gtk3/Linux

like image 82
Rüdiger Herrmann Avatar answered Oct 19 '25 13:10

Rüdiger Herrmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!