Record List Events
Description
You can trap an event when the user clicks on the column heading of a column in a record list. For example, the following script traps events for the record list control. By including the directive:
!rl_*
in the definition of the record list, you instruct Alpha Anywhere to generate all events for the record list. When you click on the first column heading, a_dlg_button will be set to rl_column1, etc. (The " rl_ " prefix is defined by the " !rl_* " directive). This script prints the name of the event to the Trace window.
ui_dlg_box("Print Mail Label",<<%dlg% Preview mail labels for which customer?; [%kl=clients,{keylist_build('h=.05,1:25[[[Name],2:25[Phone],3:25[City]', customer_id,alltrim(firstname)+' '+lastname, phone, city)}%.60,10key!rl_*]; {lf}; %dlg%,<<%code% trace.writeln(a_dlg_button) if a_dlg_button = "cancel" then 'do nothing - close the dialog else if a_dlg_button = "ok" then filter_expression = "customer_id = '"+key+"'" label.Preview("mail_labels",filter_expression) else a_dlg_button = "" end if %code%)
Here is some sample output from the Trace window generated by changing the row in the record list that has focus, and by clicking on the various column headings:
rl_column1 rl_column2 rl_change
See Also