I have done what Mr.Antonio has suggested to make Kinetic scroll optional, available in this thread viewtopic.php?f=3&t=16905&p=87669#p87669
When I enable oBrw:lKinetic:=.T. an error occurs only when I try to drag a row upwards, but if I drag the row downward it is working fine
Am I doing anything wrong ?
Here is my the error log
- Application
===========
Path and name: D:\Apps\WinAcs\WinAcs.Exe (32 bits)
Size: 2,712,576 bytes
Time from start: 0 hours 0 mins 18 secs
Error occurred at: 30/10/2009, 15:18:36
Error description: Error DBCMD/2001 Workarea not in use: DBSKIP
Args:
Stack Calls
===========
Called from: => DBSKIP(0)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSEMOVE(3199)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1453)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(9921)
Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: User.Prg => USERRIGHTS(703)
Called from: WinAcs.Prg => (b)BUILDMENU(635)
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(437)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(1003)
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(243)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(952)
Called from: WinAcs.Prg => MAIN(63)
Here is the code used to Define xBrowse
- Code: Select all Expand view
- aMenuOptions:={ {"Add" ,.T.},;
{"Edit" ,.T.},;
{"Delete" ,.F.},;
{"Print" ,.T.},;
{"Show Data on Grid/Browse",.T.},;
{"Export Data to Excel" ,.F. } }
@ 0,420 XBROWSE oBrwMenuOptions ;
COLUMNS 1, 2 ;
HEADERS "Functionalities", "Status" ;
OF oDlg ;
ARRAY aMenuOptions
oBrwMenuOptions:nMarqueeStyle:=MARQSTYLE_HIGHLROWRC
oBrwMenuOptions:aCols[1]:nWidth:=195
oBrwMenuOptions:aCols[2]:nWidth:=50
oBrwMenuOptions:nRowHeight:=20 //17
oBrwMenuOptions:bClrStd := { || oApp:aClrCol[ oBrwMenuOptions:KeyNo % 2 + 1 ] }
// Alternative way to display BMP, if multiple conditions and more than 2 bitmaps are there
oBrwMenuOptions:aCols[2]:AddResource("CheckOn")
oBrwMenuOptions:aCols[2]:AddResource("CheckOff")
oBrwMenuOptions:aCols[2]:bBmpData :={ || iif(oBrwMenuOptions:aArrayData[oBrwMenuOptions:nArrayAt][2],1,2)}
oBrwMenuOptions:aCols[2]:bStrData:={ || NIL } // Avoid showing .T. .F. in the column
// Change Tick Off/On when Clicked and ensure that this happens only in Column 2
oBrwMenuOptions:bLClicked := { | nRow, nCol | iif(oBrwMenuOptions:nColSel == 2, oBrwMenuOptions:aArrayData[oBrwMenuOptions:nArrayAt][2]:=!oBrwMenuOptions:aArrayData[oBrwMenuOptions:nArrayAt][2] ,NIL),oBrwMenuOptions:Refresh() }
// Enable user to either use Enterkey or Spacebar to change the value in Checkbox
oBrwMenuOptions:bKeyDown= {|nKey| ( oBrwMenuOptions:nColSel:=2 ,; // else ie Menu items
if ( nKey == VK_RETURN .or. nKey == VK_SPACE,;
(oBrwMenuOptions:aArrayData[oBrwMenuOptions:nArrayAt][2]:=!oBrwMenuOptions:aArrayData[oBrwMenuOptions:nArrayAt][2],oBrwMenuOptions:Refresh()), ) ;
) }
oBrwMenuOptions:CreateFromCode()
Regards
Anser