KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Retrieving the variable name of the clicked listbox's header
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: November 18, 2004

Here is a simple method that returns the name of the variable that associates with the listbox's header that is clicked by the user.

  ` Project Method: GetClickedHeader
  ` Returns the name of the variable name associated with the clicked header of a list box.
`
` Called from: Object Method of the List Box object
If (Form event=On Header Click )
  C_TEXT($0;$var)
  C_LONGINT($table;$field)
  RESOLVE POINTER(Focus object;$var;$table;$field)
  $0:=$var
End if

Note: The variable name that is returned by the method can be used to determine the type of operation that you want to perform when a specific header is clicked.