About TreeView event(#leftButtonReleased:) 
Author Message
 About TreeView event(#leftButtonReleased:)

Hi,

The next code was written.
--------------------------------
MyShell>>createSchematicWiring
super createSchematicWiring.
treePresenter when: #leftButtonReleased: send: #onLeftButtonRelease: to:
self.

MyShell>>onLeftButtonReleased: aMouseEvent
 MessageBox warning: 'test'.
--------------------------------

This event occurs at the time of double-clicking.

Doesn't it occur at the time of single clicking?

Regards

Takeya Suzuki



Sat, 24 Apr 2004 07:51:57 GMT  
 About TreeView event(#leftButtonReleased:)
Takeya Suzuki

Quote:

> Hi,

> The next code was written.
> --------------------------------
> MyShell>>createSchematicWiring
> super createSchematicWiring.
> treePresenter when: #leftButtonReleased: send: #onLeftButtonRelease: to:
> self.

> MyShell>>onLeftButtonReleased: aMouseEvent
>  MessageBox warning: 'test'.
> --------------------------------

> This event occurs at the time of double-clicking.

> Doesn't it occur at the time of single clicking?

It appears one only gets the 'mouse up' event when clicking over an area of
the tree other than one of the labels (I inserted a low-level event handler
method for WM_LBUTTONUP, namely #wmLButtonUp:wParam:lParam:, into the
TreeView class to investigate this). When one clicks over one of the labels
the TreeView control appears to absorbed the WM_LBUTTONDOWN in some way, and
consequently a WM_LBUTTONUP is never received. This is probably  because it
uses the click to initiate a drag operation, and if it is calling the Win32
DragDetect() API then that works by capturing the mouse and starting a modal
message loop until the mouse is released. DragDetect() absorbs all mouse
events up to and including the mouse up event.
Note thought that since Dolphin has subclassed the control it receives the
button down event before the control, therefore you could implement your own
selection management and drag detection, etc, but be warned that you will be
"swimming against the tide".

Regards

Blair



Tue, 27 Apr 2004 17:44:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Tcl Event Loop vs TK Event Loop issues with Asynchronous Events

2. D5.1: Workarounds for two strange TreeView quirks

3. TreeView and selectionChanging

4. help with loop on intercepting selectionChanging from TreeView

5. TreeView background color

6. Windows TreeView bug

7. Expanded Icon in TreeView

8. TreeView and virtual TreeModel problems

9. TreeView refresh

10. Potentially useful TreeView checkbox additions

11. TreeView icon question

12. TreeView custom draw

 

 
Powered by phpBB® Forum Software