headerClick
Type
message
Summary
This message is sent when the table header is clicked.
Syntax
headerClick <pColumnNumber>
Description
Use the headerClick message to detect when the table header is clicked.
Parameters
Name | Type | Description |
---|---|---|
pColumnNumber | The number of the column on which you click. |
Examples
local sDirection
on headerClick pColumnNumber
local tText
put the text of me into tText
put not sDirection[pColumnNumber] into sDirection[pColumnNumber]
set the itemDel to tab
# Sort data by this column.
if sDirection[pColumnNumber] then
sort lines of tText ascending by item pColumnNumber of each
else
sort lines of tText descending by item pColumnNumber of each
end if
set the text of me to tText
end headerClick