adjunto unas imagenes para que lo observen
http://img405.imageshack.us/slideshow/webplayer.php?id=txb1.png
[img]
http://img405.imageshack.us/img405/8646/txb1.png
http://img200.imageshack.us/img200/2471/txb2.png
http://img834.imageshack.us/img834/2815/txb3.png
[/img]
el salto tambien ocurre cuando teniendo el browse solamente y muevo el cursor del mouse hacia arriba del browse llegando a la toolbar, al llegar a la toolbar el salto ocurre, esto lo muestro en la 3er grafica, el mouse nose mira, pero puse una flechita para referencia.
revisando, el salto no ocurre cuando me muevo por el browse conlas teclas doy ENTER para editar el registro abriendose el dialogo de edicion, esto me llevo a revisar los metodos de txbrowse que involucran el uso del mouse
llegando al siguiente codigo
- Code: Select all Expand view
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TXBrowse
local oCol
local nLen, nFor, nPos
local cTxt // tooltip CELL
local nVMove, nHMove, nOldRowPos, nOldColPos
local nMousePos := ::MouseRowPos( nRow )
//KDS TrackMouseEvent( ::hWnd, TME_LEAVE ) <<------------------- aca lo comente y ya no hace el salto
if ::lDrag .or. ::lEditMode
return Super:MouseMove( nRow, nCol, nKeyFlags )
endif
if ::oCapCol != nil
::oCapCol:MouseMove( nRow, nCol, nKeyFlags )
return 0
endif
if ::nCaptured == 4
::HorzLine( nRow, 3 )
return 0
endif
if ::lPressed
// temporarily moved here
TrackMouseEvent( ::hWnd, TME_LEAVE )
//
if ::nStartTime == 0
::nStartTime := GetTickCount()
en
hay problema comentando la linea TrackMouseEvent( ::hWnd, TME_LEAVE )
este el codigo de mi modulo, aclaro que estoy usando una copia de txbrowse.prg sin modificar
- Code: Select all Expand view
/*-------------------------------------------------------------------------------------------------*/
#include "credicom.ch"
/*-------------------------------------------------------------------------------------------------*/
GLOBAL EXTERNAL oApp
/*-------------------------------------------------------------------------------------------------*/
PROCEDURE Clientes()
LOCAL oFnt1
PRIVATE oDlg, oBrw, oMsg, oBus
CIUD->( OrdSetFocus( "NUM_CIUD" ), DBGoTop() )
RUTA->( OrdSetFocus( "NUM_RUTA" ), DBGoTop() )
GEST->( OrdSetFocus( "NUM_GEST" ), DBGoTop() )
COBR->( OrdSetFocus( "NUM_COBR" ), DBGoTop() )
PRES->( OrdSetFocus( "CLIEPRES" ), DBGoTop() )
CLIE->( OrdSetFocus( "NUM_CLIE" ), DBGoTop() )
DBSELECT "RUTA"
SET RELATION TO NUM_COBR INTO COBR
DBSELECT "CLIE"
SET RELATION TO NUM_CIUD INTO CIUD,;
NUM_GEST INTO GEST,;
NUM_RUTA INTO RUTA
DEFINE FONT oFnt1 NAME "Tahoma" SIZE 0,-12
DEFINE DIALOG oDlg NAME "DLG_CLIENTESC" TITLE "Catalogo de clientes" OF oApp:oMainWnd ICON GetIcon() FONT oFnt1
REDEFINE XBROWSE oBrw ID 101 OF oDlg ALIAS "CLIE" ON DBLCLICK Clientes_Editar( FALSE ) FONT oFnt1
ADD TO oBrw DATA CLIE->NUM_CLIE TITLE "*Nº Cliente" SIZE 090 ORDER "NUM_CLIE" CENTER
ADD TO oBrw DATA CLIE->NOMBRE TITLE "*Nombre" SIZE 285 ORDER "NOMBRE"
ADD TO oBrw DATA CLIE->CEDULA TITLE "*Cedula" SIZE 120 ORDER "CEDULA"
ADD TO oBrw DATA CIUD->NOMBRE TITLE "Ciudad" SIZE 130
ADD TO oBrw DATA RUTA->NOMBRE TITLE "Ruta" SIZE 120
ADD TO oBrw DATA IIf( !Empty( CLIE->NOTAS ), 1, 0 ) TITLE "Nota" SIZE 028 BITMAP IN "BMS_POSTIT"
oBrw:SetRdd()
oBrw:bKeyDown := {|nKey| Clientes_ProcesaTecla( nKey ) }
oBrw:nHeaderHeight := 25
oBrw:lHScroll := FALSE
oBrw:lSeekUpper := TRUE
oBrw:bSeek := {|cString| DbSeek( Upper( cString ) ) }
oBrw:MyConfig( TRUE )
oBrw:aCols[1]:nHeadStrAlign := AL_LEFT
ACTIVATE DIALOG oDlg CENTER ON INIT Clientes_Toolbar()
LimpiarAreas()
RELEASE FONT oFnt1
RELEASE oDlg, oBrw, oMsg, oBus
RETURN
/*-------------------------------------------------------------------------------------------------*/
PROCEDURE Clientes_Toolbar()
LOCAL oToolbar, oPopUpPrn, oPopUpPre
DEFINE BUTTONBAR oToolBar OF oDlg SIZE 45, 45 2007
DEFINE BUTTON NAME "TB_CLOSE" OF oToolBar ACTION oDlg:END() TOOLTIP "Salir del modulo"
DEFINE BUTTON NAME "TB_ADD" OF oToolBar ACTION Clientes_Editar( TRUE ) TOOLTIP "Registro de nuevo cliente" GROUP
DEFINE BUTTON NAME "TB_EDIT" OF oToolBar ACTION Clientes_Editar( FALSE ) TOOLTIP "Editar datos de cliente"
DEFINE BUTTON NAME "TB_DELETE" OF oToolBar ACTION Clientes_Borrar() TOOLTIP "Borrar datos de cliente"
DEFINE BUTTON NAME "TB_PRINTERM" OF oToolBar ACTION Dummy() TOOLTIP "Menu de listados" GROUP
DEFINE BUTTON NAME "TB_TABLEPRES" OF oToolBar ACTION Clientes_Prestamos() TOOLTIP "Mostrar prestamos otorgados" GROUP
DEFINE BUTTON NAME "TB_TABLESEARCH" OF oToolBar ACTION Clientes_BuscarXPrestamo() TOOLTIP "Buscar por nº de prestamo"
SET MSGBAR OF oDlg TO "INS=Nuevo, DEL=Borrar, ENTER=Editar, F2=Prestamos, F9=Refrescar" 2010
DEFINE MSGITEM oBus OF oDlg:oMsgBar PROMPT "" SIZE 100 COLOR CLR_HBLUE, CLR_BLACK
oDlg:SetControl( oBrw )
oBrw:nTop += 1
oBrw:nHeight -= 1
oBrw:oSeek := oBus
oToolBar:bRClicked:={|| TRUE }
oToolBar:bLClicked:={|| TRUE }
RETURN
/*-------------------------------------------------------------------------------------------------*/
PROCEDURE Clientes_ProcesaTecla( nKey )
DO CASE
CASE nKey == VK_INSERT
Clientes_Editar( TRUE )
CASE nKey == VK_RETURN
Clientes_Editar( FALSE )
CASE nKey == VK_DELETE
Clientes_Borrar()
CASE nKey == VK_F2
Clientes_Prestamos()
CASE nKey == VK_F9
Refrescar_Browse( oBrw )
ENDCASE
RETURN
salu2
carlos vargas