WebControl.Shown

From Xojo Documentation

Event


WebControl.Shown()

New in 2010r4

Supported for all project types and targets.

The browser has finished loading or reloading the page. Use the Shown event for initializing your controls or doing anything that would interact with other controls or user interface elements on the web page instead of the Open event.

Sample Code

This code in the Shown event of a WebListBox adds 2 rows with 3 columns:

Me.DeleteAllRows
Me.AddRow("Row 1", "Bob", "Roberts")
Me.AddRow("Row 2", "Barb", "Reynolds")

This example sets the text of a label:

If Session.LoggedIn Then
Me.Text = "Welcome!"
Else
Me.Text = "Welcome, " + Session.UserName
End If