Jump to content
Sign in to follow this  
terox

Dialog txt box + frame + formatted text

Recommended Posts

Dialog item subclass

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class uppertxt : RscText

{

idc = 9

x = 0.75; y = 0.1423;

w = 0.133; h = 0.71319;

style = ST_CENTER + ST_MULTI + ST_NO_RECT

linespacing = 1

colorText[] = {0.250, 0, 0, 1};

colorBackground[] = {1, 0, 0, 0};

font = "TahomaB24"

SizeEX = 0.025

text = ""

};

eg

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_var1 = "hello"

_var2 = "Goodbye"

_example = format ["%1 this is on line 1\n%2 this is on line 2",_var1,_var2]

ctrlset txt [9,_example]

I basically want to place a frame around the text box while keeping the formatted string variable in multiline

without adding "+64" to the style attribute, my text readout displays correctly

eg

Hello this is on line 1

Goodbye this is on line 2

however when i introduce the "64 style"

the variable values are displayed correclty however i also see the "\n" and all the text is on 1 line

eg

hello this is on line 1 \n goodbye this is on line 2

any help would be greatly appreciated, thanks

Share this post


Link to post
Share on other sites

I think you have to do the frame seperately, thus the frame in the back and the multiline element in the front. Some years ago I experimented with this stuff and I think I couldn't do it otherwise then.

Share this post


Link to post
Share on other sites

thx for the reply

Share this post


Link to post
Share on other sites

Hey cool, I never knew you could have a multi-line textbox, and use \n for newlines! I've always used lots of spaces to go to the next line, which needless to say is crap. That's pretty darn handy in fact...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×