Symbian
Symbian OS Library

FAQ-0948 If I click the button and drag the pointer off the button it remains in an "activated" state. Why ?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: UIKON
Created: 11/06/2003 Modified: 11/18/2003
Number: FAQ-0948
Platform: Not Applicable

Question:
I have added a CEikCommandButton to my view. If I click the button and drag the pointer off the button it remains in an "activated" state. Why is this ?

Answer:
A control only receives pointer up and down events (by default). So when you press the control, it is activated by the pointer down event; When you drag the pointer away, it doesnt get the pointer up event or the drag event.

    To get the button to deactivate when you drag the pointer off it, you need to enable pointer move and pointer drag events. This behaviour is enabled with a call to CCoeControl::EnableDragEvents().

    Call this within the ConstructL() of the Compound control which contains the CEikCommandButton.