These are chat archives for CRESS-Surrey/eXtraWidgets

10th
Nov 2015
fxfb
@fxfb
Nov 10 2015 10:56
Hi @nicolaspayette . Great extension so far! I have a little question. Is it possible to force a line break in a text or label field of a widget. Just like \n in other programming languages.
I can't write a little note text, so i have to create the single lines one by one. That's annoying.
Nicolas Payette
@nicolaspayette
Nov 10 2015 17:58
Hi @fxfb! I'm glad that you're using the extension! NetLogo (and xw) do support the use of \n in some cases. Not being able to use it in widgets is a limitation of Swing. The workaround is to wrap the text in html and use a <br /> tag, e.g.: xw:set-label "<html>foo<br />bar</html>".