[IronPython] newbie getting started problem
Peter Howard
peterhoward42 at gmail.com
Thu Aug 12 00:54:01 CEST 2010
I've eventually found what was wrong myself, but will post it here to
potentially help other newcomers:
The Python code was fine, the problem lay in the html.
Specifically the default behaviour of this:
<script src="http://gestalt.ironpython.net/dlr-latest.js"
type="text/javascript"></script>
is to make the Silverlight control just one pixel wide, and one pixel tall -
and thus you cannot see any Silverlight graphics you subsequently add.
So to fix it, you pre-initialise the control's width and height settings
before running dlr-latest.js as shown in this complete html example:
<html>
<head>
<script type="text/javascript">
if (!window.DLR)
window.DLR = {};
DLR.settings = {width: "100%", height: "100%" };
</script>
<script src="http://gestalt.ironpython.net/dlr-latest.js"
type="text/javascript"></script>
</head>
<body>
<script type="text/python" src="app.py"></script>
</body>
</html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100811/40349e4b/attachment.html>
More information about the Ironpython-users
mailing list