WebListBox.HeaderPressed

From Xojo Documentation
Jump to: navigation, search
Event


WebListBox.HeaderPressed(column As Integer)

Called when a WebListBox header has been pressed. The index on column is zero-based. You can use this event to sort the column that was pressed.

Example

When the header is pressed, the sort order is changed and the data reloaded:

mSortAscending = Not mSortAscending // Property on Web Page

mValues.Sort // Property array on Web Page with string values to display

If Not mSortAscending Then
// Reverse the data
Dim descValues() As String
For i As Integer = UBound(mValues) DownTo 0
descValues.Append(mValues(i))
Next
mValues = descValues
End If

// Remove existing data
Me.DeleteAllRows

// Reload data in newly sorted order
For i As Integer = 0 To mValues.UBound
Me.AddRow(mValues(i))
Next
Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About