ScreenShot
' Demonstration of how to create HTML objects, feed them HTML
' and handle hyperlink selection.

'  Create HTML control on the left which contains hyperlinks
addobject "MGCENet.HTML", "List",  2, 2, 120, OUTPUT.Height - 2

'  Create HTML control on the right to display which link was selected
addobject "MGCENet.HTML", "Disp", 124, 2, OUTPUT.Width - 126, OUTPUT.Height - 2

' Give 'em both borders
List.Border = TRUE
Disp.Border = TRUE

' Set right control to display a gray background
Disp.AddText "<body bgcolor='#CCCCCC'></body>"

' Add a list of links to the left control
List.AddText "<body bgcolor='#FFFFFF' link='#FF0000'><center><br><font size=3><b>"
List.AddText "<a href='Item1'>List Item 1</a><br> <br>"
List.AddText "<a href='Item2'>List Item 2</a><br> <br>"
List.AddText "<a href='Item3'>List Item 3</a><br> <br>"
List.AddText "<a href='Item4'>List Item 4</a><br> <br>"
List.AddText "<a href='Item5'>List Item 5</a><br> <br>"
List.AddText "<a href='Item6'>List Item 6</a><br>"
List.AddText "</body>"
List.TextDone    ' This indicates that no more text will be added, so clean up any errors in HTML


'  A link in the left control has been selected
sub List_Click( sTarget, sData )
   s = "<body bgcolor='#C0C0C0'><center><font size=5><b>"               ' Create HTML to display in Disp
   s = s & sTarget & " selected from list</b></font></center></body>"
   Disp.SetText s            '  Clear any old HTML and add new
end sub