Skip to content

FocusedItemChanged Event

See Also

See Also

Description

The FocusedItemChanged event occurs when the focus has changed from one item or group to a different item or group.

Syntax

Public Event FocusedItemChanged()

Remarks

The FocusedItemChanged event occurs each time the focus changes from one item or group to a different item or group. This event occurs both when the user clicks on an item or group and if the Arrow keys are used to navigate the items.

The FocusedItem property holds a pointer to the currently focused item.

Note: Both the ItemClick and FocusedItemChanged events occur when a user clicks on a group or item.

If the user clicks on the item that already has focus, both events will not occur. Also note that when dragging an item, the FocusedItemChanged event will fire when the item is first clicked, and again when the item is dropped inside a group.

Example

FocusedItemChanged Sample (Visual Basic)

This sample illustrates how to determine when the focus has changed from one item to another.

' The FocusedItemChanged event occurs each time the focus changes from one item or group to another.  
' This event occurs both when the user clicks on an item or group and if they use the Arrow keys to  
' navigate the items.  
' Note: Both the ItemClick and FocusedItemChanged events occur when a user clicks on a group or item.  
' If the user clicks on the item that already has focus, both events will not occur.  

Private Sub wndToolBox_FocusedItemChanged()  
    Dim Item As TaskPanelItem  

    ' Gets the currently focused item, this is the last item that was clicked  
    Set Item = wndToolBox.FocusedItem  

    Debug.Print "Focused Item = " & Item.Caption  
End Sub

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.