如何使用標記在文字方塊中進行文字對齊?我注意到,如果文字方塊啟用了標記,則文字對齊屬性將被忽略。
我希望文字右對齊,但這是行不通的。但是一旦我關閉標記 - 它就會正確對齊。
這是一個錯誤嗎?
有沒有辦法使用標記來證明標記文字的合理性?
進階統計建模消費者與市場研究實驗設計回复:如何在帶有標記的文本框中進行文本對齊?如果問題如前一個示例所示,則不會真正想到好的解決方案。 也許您可以嘗試修改文本框的寬度並在其之前添加 SpacerBox。 不知道從長遠來看這會有多好。
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;
回复:如何在帶有標記的文本框中進行文本對齊?這是一個完美的示範! 對我來說看起來像是一個錯誤 - 或者至少這種行為是完全出乎意料的。 有什麼解決方法嗎?
回复:如何在帶有標記的文本框中進行文本對齊?這可能會讓你知道發生了什麼。 使用標記,“額外”字符仍然很可能存在,即使您沒有看到它們,而且看起來它不會正確對齊。
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;