| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. QCanvas DoubleClick #722 Posted by: OvalX 2003-01-04 02:27:02 | Hi Guidance, help me, please! When I use QCanvas event OnDblClick, it does not effect (sorry, it still take effect for OnClick - I have this event too). Have U any hint? Thanx. OvalX ------------------- Declare Sub DoubleClickCanvas (Sender as QCanvas) Declare Sub ClickCanvas (Sender as QCanvas) Declare sub CanvasPaint (Sender as QCanvas)
Create Form as QForm width = 200: height = 200 Center Caption = "example" ' ---------------------- Create Canvas as Qcanvas Left = 10: Top = 10: width = 80: Height = 80 OnDblClick = DoubleClickCanvas OnClick = ClickCanvas OnPaint = CanvasPaint End Create ' ---------------------- ShowModal End Create
Sub DoubleClickCanvas (Sender as QCanvas) showmessage "DoubleClick" End Sub Sub ClickCanvas (Sender as QCanvas) showmessage "OneClick" End Sub Sub CanvasPaint (Sender as QCanvas) Canvas.Rectangle(0,0,80,80,0) End Sub | 2. Bug? #723 | It seems a QCanvas bug -- problem is reproducible at my side. I suppose you have to simulate your own double-click event by single-click and a timer. Or, use form.wndproc to handle the double-click message sent by Windows. | 3. Re: Bug? #724 Posted by: OvalX 2003-01-05 02:15:33 | Thank You very much, really. Your hint saves my time, I do not must search, if is a bug in my code. Have a nice day! OvalX | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|