How could I find out on what folder you drop?
oFld:bDropOver = { |uDropInfo,nRow,nCol,nKeyFlags| msginfo(nCol) }
oxBrwFolio1:nLeft := 0

oxBrwFolio1:nLeft := 10

Code: Select all | Expand
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFld
LOCAL oBrw1
LOCAL oBrw2
local oCursor
DEFINE CURSOR oCursor HAND
USE customer New
DEFINE DIALOG oDlg TITLE "FiveWin Dynamic folders" ;
FROM 5, 5 TO 40, 150
@ 0.5, 10 FOLDER oFld PROMPT "&xBase", "&And OOP", "&Power" ;
OF oDlg SIZE 160, 90
@ 1, 1 LISTBOX oBrw1 FIELDs (field->first) ;
HEADERS "Name" ;
FIELDSIZES 140 ;
SIZE 140, 60 ;
OF oFld:aDialogs[ 1 ]
@ 1, 10 LISTBOX oBrw2 FIELDs (field->first) ;
HEADERS "Name" ;
FIELDSIZES 140 ;
SIZE 140, 60 ;
OF oFld:aDialogs[ 2 ]
oBrw1:oDragCursor := oCursor
oBrw2:oDragCursor := oCursor
oFld:bDropOver = { | uDropInfo, nRow, nCol, nKeyFlags | ShowPos( nRow, nCol, oFld ) }
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function ShowPos( nRow, nCol, oFld )
local aPoint
if nRow > 32000
nRow = - ( 65535 - nRow )
endif
if nCol > 32000
nCol = - ( 65535 - nCol )
endif
aPoint = { nRow, nCol }
aPoint = ClientToScreen( GetFocus(), aPoint )
ScreenToClient( oFld:hWnd, aPoint )
MsgInfo( "Row: " + Str( aPoint[ 1 ] ) + ", Col: " + Str( aPoint[ 2 ] ) )
return nil
//----------------------------------------------------------------------------//
Code: Select all | Expand
Function TabChk( nCol, oFld )
local n := 1, nPos := 0
while nPos < nCol .and. n <= Len( oFld:aPrompts )
nPos += GetTextWidth( 0, oFld:aPrompts[ n++ ], oFld:oFont:hFont ) + 5
end
msginfo( "Drop to " + oFld:aPrompts[--n])
return n
Code: Select all | Expand
Function TabChk( nCol, oFld )
local n := 1, nPos := 0
while nPos < nCol .and. n <= Len( oFld:aPrompts )
nPos += Max( GetTextWidth( 0, oFld:aPrompts[ n++ ], oFld:oFont:hFont ), <try some values here> ) + 5
end
msginfo( "Drop to " + oFld:aPrompts[--n])
return n