Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / QCanvas DoubleClick

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. 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
Message2. Bug?
#723
Posted by: guidance 2003-01-04 09:57:18
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.
Message3. 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 • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sun 2017-10-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0