The MulticolumnTextField component integrates with the Macromedia scrollbar components in a similar manner to standard dynamic text fields. The component comes with three properties (mtfpagesize, mtfminscroll, and mtfmaxscroll) to enable correct integration with the scrollbar, and these should be used to set the scrollbar properties. The following example demonstrates the procedure:
//assign content to the Multicolumn Text Field component
myInstance.mtftext = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer...";
//assign the properties of the Multicolumn Text Field to the scrollbar
myScrollBar.setScrollProperties(myInstance.mtfpagesize, myInstance.mtfminscroll, myInstance.mtfmaxscroll);
//assign the changeHandler function to the scrollbar
myScrollBar.setChangeHandler ("scroller");
//create the scrollbar's function
function scroller () {
//Each time function is called alter mtfscroll to match scrollbar position
myInstance.mtfscroll = myScrollBar.getScrollPosition();
}
Note:
Content can be assigned to the MulticolumnTextField component via the custom interface. If this is the preferred method then do not re-assign the content in the script.
Note:
The content specified in this example would not be sufficient to cause the creation of more than one column, it has been reduced in size for the purposes of demonstration.