Unless there's some way of inserting control characters into the text itself, the only way I can think of approaching it would be to break down the sentence into segments, each of them inside a different text box, and then just string them together something like the following: tba = text box(" This ", set font style("italic")); tbb = text box("is a "); tbc = text box("very ", set font style("bold")); tbd = text box("tricky question. "); nw1 = new window("Demo", hlistbox(tba, tbb, tbc, tbd)); If you don't know how many changes in style you're going to have in advance, you won't know how many text boxes you're going to need, but you could get around that by doing something like this, in which I've also added a border box with lines on all sides around the text: textlist = {" This ", "is a ", "very ", "tricky question. "}; stylelist = {"italic", "", "bold", ""}; hlb = hlistbox(); for(i=1, i<=nItems(textlist), i++, hlb << append(textbox(textlist, set font style(stylelist))) ); nw2 = new window("Demo2", borderbox(hlb, << sides(15))); Is that of any use?
... View more