xBrowse - drag - getfocus - error

xBrowse - drag - getfocus - error

Postby Otto » Thu Oct 07, 2010 8:16 pm

I have 2 xBrowse on a WINDOW.
If you click inside the left and then in the right xBrowse xBrowse the drag mode starts although you don’t hold down the mouse key.
When the twin browses are on a dialog there is no problem.
But the problem is when the browses are on a window.

Thanks in advance
Otto

Code: Select all  Expand view

#include "fivewin.ch"
#include "xbrowse.ch"

//#define USEDLG

function main()

   local oWnd, oPanel, oState, oCust, oFont, oCur
   local nWidth

   SetKinetic( .f. )

   DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-12
   DEFINE CURSOR oCur DRAG

#ifdef USEDLG
   DEFINE DIALOG oWnd SIZE 600,400 PIXEL FONT oFont

   nWidth      := 100
   oPanel      := oWnd
#else
   DEFINE WINDOW oWnd
   oWnd:SetFont( oFont )

   nWidth      := 200
   oPanel      := oWnd
#endif

   USE STATES NEW
   USE CUSTOMER NEW

   @ 10,10 XBROWSE oState SIZE nWidth,-10 PIXEL OF oPanel ;
      COLUMNS 'NAME' ALIAS 'STATES' CELL LINES NOBORDER

   @ 10,nWidth XBROWSE oCust SIZE -10,-10 PIXEL OF oPanel ;
      AUTOCOLS ALIAS 'CUSTOMER' CELL LINES NOBORDER

   WITH OBJECT oCust
      :oDragCursor   := oCur
      :bDragBegin    := { || nil }
      :bGotFocus     := { || nil }
      :lAllowRowSizing  := .f.
   END

   oState:CreateFromCode()
   oCust:CreateFromCode()

#ifdef USEDLG
   ACTIVATE DIALOG oWnd CENTERED
#else
   ACTIVATE WINDOW oWnd MAXIMIZED
#endif

   RELEASE FONT oFont
   RELEASE CURSOR oCur

return nil
//------------------------------------

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse - drag - getfocus - error

Postby nageswaragunupudi » Fri Oct 08, 2010 6:37 am

I too confirm the problem.
The problem is only when the window is activated in MAXMIZED mode, not when activated normally.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10630
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse - drag - getfocus - error

Postby Otto » Mon Oct 11, 2010 8:52 pm

I began to log control.prg, windows.prg and xbrowse:

This is what I found so fare:
This is when I stay inside the xBrowse and click on different rows:
06.10.2010 12:31:20: LButtonDown xbrowse#####
06.10.2010 12:31:20: -(4)--->><LButtonDown xbrowse##### return Super:LButtonDown
06.10.2010 12:31:20: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:31:20: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:31:20: xbrowse - LButtonUp
06.10.2010 12:31:20: CONTROL - LButtonUp .F.
06.10.2010 12:31:20: bLostFocus TXBROWSE - 4393184 -

06.10.2010 12:34:42: nach bGotFocus TXBROWSE - 4588584 -
06.10.2010 12:34:43: LButtonDown xbrowse#####
06.10.2010 12:34:43: -(5)--->><LButtonDown xbrowse##### return Super:LButtonDown
06.10.2010 12:34:43: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:34:43: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:34:43: xbrowse - LButtonUp
06.10.2010 12:34:43: CONTROL - LButtonUp .F.
06.10.2010 12:34:43: windows - LButtonUp TXBROWSE

Here is when xBrowse gets focus:
lButtonDown is not executed first but then LButtonUp executes LButtonDown – but I don’t understand why


06.10.2010 12:31:19: nach bGotFocus TXBROWSE - 5835110 -
06.10.2010 12:31:19: xbrowse - LButtonUp
06.10.2010 12:31:19: CONTROL - LButtonUp .F.
06.10.2010 12:31:19: windows - LButtonUp TXBROWSE
06.10.2010 12:31:19: -(5)--->><LButtonDown xbrowse##### return Super:LButtonDown
06.10.2010 12:31:19: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:31:19: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F.
06.10.2010 12:31:19: .T.
06.10.2010 12:31:19: bDragBegin
06.10.2010 12:31:19: .T.
06.10.2010 12:31:19: .T.
06.10.2010 12:31:19: .T.
06.10.2010 12:31:19: .T.
06.10.2010 12:31:19: .T.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse - drag - getfocus - error

Postby Daniel Garcia-Gil » Tue Oct 12, 2010 11:18 pm

Mr. Otto

please comment the SysRefresh in METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TXBrowse

Code: Select all  Expand view
//     SysRefresh()


(just only one)

test this change please
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: xBrowse - drag - getfocus - error

Postby Daniel Garcia-Gil » Wed Oct 13, 2010 12:12 am

Mr. Otto

please comment the SysRefresh in METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TXBrowse

Code: Select all  Expand view
//     SysRefresh()


(just one)

test this change please
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: xBrowse - drag - getfocus - error

Postby Otto » Wed Oct 13, 2010 4:50 am

Hallo Daniel,
thank you so much. The problem is solved.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests