Hello!

I'm using the list widget to use as
control/instructions for a walkthrough-guide-like
multilayered form. But I want the text to be wrapped
in the listitem. I see the listitem being a label, but
when I try to run through the list array to set those
labels to wrapping.

Is it wrong in the below code snippet or should I do a
custom variant of the list widget which by default is
wrapping?

***

<html>
<head>
<title>DynAPI Examples - List</title>
<script language="Javascript"
src="dynapi/src/dynapi.js"></script>
<script language="Javascript">

// INCLUDE WIDGETS & EXTENSIONS

DynAPI.setLibraryPath('dynapi/src/lib/')
DynAPI.include('dynapi.api.*')
DynAPI.include('dynapi.gui.label.js')
DynAPI.include('dynapi.gui.list.js')
DynAPI.include('dynapi.ccreationExt.layerpos.js')

// SET TEXT ON WALKTHROUGH-MENU

walkthrough = new Array();
walkthrough[1] = "Text one is really a long one";
walkthrough[2] = "So is the second text snippet";
walkthrough[3] = "And the third text is also pretty
long";
walkthrough[4] = "As well as the final one which is
where the user will be warned to check that all is
correct before submitting.";

// RUN DYNAPI ONLOAD

DynAPI.onLoad = function() {
        list = new List();
        list.moveTo(350,20);
        list.setWidth(450);
        list.setBgColor('#CACACA');
        list.boldOnSelect(false);
        for (i=1;i<5;i++) list.add(walkthrough[i],i);
        for (i=1;i<list.items.lenght;i++)
list.items[i].Label.setWrap(true);
        for (i=1;i<list.items.lenght;i++)
list.items[i].Label.setText(walkthrough[i]);

list.setColors('#CACACA','#eeeeee','#FFFFBF','#666666','#666666','#666666');
        DynAPI.document.addChild(list);
        list.positionInParent('topright', 25,25);
}

</script>
</head>
<body bgcolor="#ffffff">
</body>
</html>





***

Henrik Våglin [ [EMAIL PROTECTED] ]

=====
// Henrik Vaglin

**************************************************
Visit my comics artpage at 
http://photos.yahoo.com/bc/hvaglin?d&.flabel=fld5&.src=bc
**************************************************

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to