jts_2009 96 Posted May 25, 2019 Hello. Anyone know, is there actually a way to convert structured text back to a normal text..? (type 0). I have structured text in dialog. But command 'ctrlsetStructuredtext' works only with displays (UI elements (or Windows) created via createDisplay). So im trying to figure out how to convert it back to normal text, because I have dialog created with createDialog command, where ctrlsetstructuredtext doesn't work. I use ctrlsettext command there. (It should appear with needed formatting like position right or left inside the control... ) So for example this: <t align = 'left'>Item cost:</t><t align = 'right'>© 535</t><br/><t align = 'left'>Weight:</t><t align = 'right'>12</t><br/><t align = 'left'>Bottlecaps:</t><t align = 'right'>300</t> should look same if I convert it back to normal text. Not sure if it's possible, but... maybe? The text should be on the left side of the control and the number on the right. Like: Item cost: 535 Weight: 12 Bottlecaps: 300 P.S.: Dialog is created with createDialog command Share this post Link to post Share on other sites
killzone_kid 1326 Posted May 25, 2019 Both createDisplay and createDialog have no relevance to StructuredText Share this post Link to post Share on other sites
jts_2009 96 Posted May 25, 2019 38 minutes ago, killzone_kid said: Both createDisplay and createDialog have no relevance to StructuredText Yeah, I managed that already -) Here the solution: _display = (findDisplay 7300); // idd of dialog _strText = format ["<t align = 'left'>Item cost:</t><t align='right'>© %1</t><br/>%2:<br/>%3:<br/>", _Price, 45, "WIP"]; (_display displayCtrl 312) ctrlSetStructuredText parseText _strText; // 312 is idc of the control Share this post Link to post Share on other sites