UI Events

Events have changed in lib-st.

You can now register any event you want for your scrolling table, and these events will be fired for each cell.

To register your event call the function '''RegisterEvents''' and pass in a table of your events paired with their handlers:

local st = ScrollingTable:CreateST();
    ["OnClick"] = function (rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...)
        --[[ handle onclick event here ]]--

        --[[ return true to have your event override the default one
             return false, or nothing at all to have the deafult handler 
                processed after yours.
             The default OnClick handler for example, handles column sorting clicks.
             if row and realrow are nil, then this is a column header cell ]]--


All event handlers will be supplied the following arguments...


This is the UI Frame table for the row.


This is the UI Frame table for the cell in the row.


This is the data table supplied to the scrolling table (in case you lost it :) )


This is the cols table supplied to the scrolling table (again, in case you lost it :) )


This is the number of the UI row that the event was triggered for.<br/> ex. If your scrolling table only shows ten rows, this number will be a number between 1 and 10.


This is the exact row index (after sorting and filtering) in the data table of what data is displayed in the row you triggered the event in. (NOT the UI row!)


This is the index of which column the event was triggered in.


This is a reference to the scrollingtable table.


Any arguments generated by the '''NORMAL''' Blizzard event triggered by the frame are passed as is.


To aquire the actual data of the cell for the event that was triggered, you can do this in your handler function:

local celldata = data[realrow].cols[column];


  • To post a comment, please or register a new account.
Posts Quoted:
Clear All Quotes