Header_Mouse_Click - dbGridDS
Sent whenever a header has received a mouse click
Type: Event
Parameters
| Parameter | Type | Description |
|---|---|---|
| Item# | Integer |
Syntax
Procedure Header_Mouse_Click Integer Item#
Description
The action depends on the setting of Prompt_Button_Mode.
If Prompt_Button_Mode is not set to PB_PromptOff, the program tries to navigate to the grid column that the item number belongs to by sending Activate_Column. When this message returns zero (success), Prompt is sent to the object. Thus, if the connected table.column has a prompt object (Field_Prompt_Object) defined, the prompt object is invoked. The prompt object is often a lookup list.
If Prompt_Button_Mode is set to PB_PromptOff, the program checks whether pbHeaderTogglesDirection is set to True, the dbGrid already has the focus and the current column already matches the passed item number. If these three conditions are True, DoToggleColumnOrdering is sent, else Activate_Column is sent to change to the column belonging to the item. One of the effects of this is Item_Change being triggered.