|
From: Les & J. H. <les...@em...> - 2007-03-11 18:24:59
|
<html>
<body>
Hi,<br><br>
This seems so easy I am embarrassed to ask, but somewhere I missed
something. <br><br>
I can't generate multi-line text in a StaticBox component. When I
enter a '\n' newline characer in the text, it displays the text including
the '\n'.<br><br>
When the string is:
<dl>
<dd>'This is line one. \n This is line two.'
</dl>It displays as:
<dl>
<dd>This is line one. \n This is line two.
</dl>rather than as:
<dl>
<dd>This is line one.
<dd>This is line two.
</dl>The wxWidgets documentation says that adding the newline character
will yield multi-line text.<br><br>
What am I doing wrong?<br><br>
<br>
HERE IS THE SCRIPT<br><br>
from PythonCard import model<br><br>
class MyMain(model.Background):<br>
pass
<br><br>
if __name__ == '__main__':<br>
app = model.Application(MyMain)<br>
app.MainLoop()<br><br>
<br><br>
HERE IS THE RESOURCE FILE<br><br>
{'application':{'type':'Application',<br>
'name':'myMain',<br>
'backgrounds': [<br>
{'type':'Background',<br>
'name':'doWork',<br>
'title':'My
Work',<br>
'size':(294,
102),<br><br>
'components': [<br><br>
{'type':'StaticText', <br>
'name':'StaticText1', <br>
'position':(10, 10), <br>
'text':'This is line one. \\n This is line two.',
<br>
},<br><br>
] # end components<br>
} # end background<br>
] # end backgrounds<br>
} }<br>
</body>
</html>
|