How to do text justification in a TextBox with Markup?I noticed that if text box has Markup enabled, then Text Justification property is ignored.
I want the text to be right justified, and it just doesn't work. But as soon as I turn off markup - it aligns correctly.
Is it a bug?
Is there a way to justify marked up text using markup?
Advanced Statistical ModelingConsumer and Market ResearchDesign of ExperimentsRe: How to do text justification in a TextBox with Markup?If the issue is as the previous example demonstrated, good solutions don't really come to mind. Maybe you could try playing around modifying the Width of textbox and adding SpacerBox before it. No idea how well this would work in the long run.
Names Default To Here(1);
win = New Window("Example", V List Box(Align(right),
Spacer Box(Size(1400,0)),
fontobj = text = Text Box("This is bold text. This is italic text. This is underlined text. This is bold, italic, underlined text.")));
text << Set Width(500);
text << Justify Text("right");
text << setText(
"This is <B>bold</B> text. This is <I>italic</I> text. This is <U>underlined</U> text. This is <B><I><U>bold, italic, underlined</U></I></B> text."
);
wait(2);
text << markup;
Re: How to do text justification in a TextBox with Markup?This was a perfect demonstration! Looks like a bug to me - or at least the behavior is totally unexpected. Any workaround for this?
Re: How to do text justification in a TextBox with Markup?This might give some idea what is going on. With markup the "extra" characters are still most likely there even if you don't see them and it looks like it won't align properly.
Names Default To Here(1);
win = New Window("Example", V List Box(Align(right),
fontobj = text = Text Box("This is bold text. This is italic text. This is underlined text. This is bold, italic, underlined text.")));
text << Set Width(1400);
text << Justify Text("right");
Wait(2);
text << setText(
"This is <B>bold</B> text. This is <I>italic</I> text. This is <U>underlined</U> text. This is <B><I><U>bold, italic, underlined</U></I></B> text."
);
wait(2);
text << markup;