Page 1 of 1
Not move cursor from get
Posted: Wed Feb 24, 2016 6:17 pm
by digitsoft
Hi Roger
As I can make the cursor up and down do not move from the get
Re: Not move cursor from get
Posted: Wed Feb 24, 2016 6:39 pm
by rdonnay
This is the default behavior because it was inherited from ReadModal() in Clipper.
You can override this behavior with a custom handler.
Code: Select all
DCREAD GUI .. HANDLER myHandler
STATIC FUNCTION myHandler( nEvent, oXbp, mp1, mp2 )
IF nEvent == xbeP_Keyboard .AND. oXbp:isDerivedFrom('DC_XbpGet') .AND. mp1 $ { xbeK_UP, xbeK_DOWN }
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
If you want this to be the new default for all windows, Use the function DC_ReadGuiHandler().
Re: Not move cursor from get
Posted: Wed Feb 24, 2016 7:01 pm
by digitsoft
Hi Roger
No work
@ 0.00,00.3 DCSAY ""
@ 0.5,00.3 DCSAY "Buscar:" GET cSeekData PICT "@!k" ;
GETPOS IIF(!EMPT(aRutaBitMap),0.4,0.4),06.2 ;
GETSIZE nAncho-IIF(!EMPT(aRutaBitMap),17,06) ;
GETOBJECT oSeekData ;
KEYBLOCK {|a,b,o|Pop_BrowseKeySeek(GetList, a,b,o, @oDataBase, @oPop_Browse, cDataBase, cFields, cOrderBy, cWhere ), IIF(EMPT(cSeekData ),SetAppFocus( oSeekData ),NIL) }
@ 2.0,00.3 DCSAY "Ordenado Por:" FONT "09.Arial Bold"
@ 1.8,13.0 DCCOMBOBOX cOrderBy LIST aOrderBy TYPE XBPCOMBO_DROPDOWNLIST SIZE 25.0,10.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
ITEMSELECTED {|| SQLSort( GetList, oDataBase, oPop_Browse, ALLTRIM(RIGHT(cOrderBy,15))) }
DCREAD GUI FIT MODAL TITLE cTitulo OPTIONS GetOptions SETAPPWINDOW TO lOk PARENT @__oDlg ;
eval {|o| IIF(VALTYPE(oBitMapMarco) = "O", DC_BitMapDraw( oBitMapObject, eval(RutaBitMap( oDataBase, aFields[1][1], aRutaBitMap )) ), ),;
SetAppFocus( oSeekData ) } ;
HANDLERBLOCK {|a,b,c,d,e| myHandler(a,b,c,d,e) }
Re: Not move cursor from get
Posted: Wed Feb 24, 2016 7:32 pm
by rdonnay
IF nEvent == xbeP_Keyboard .AND. (oXbp:isDerivedFrom('DC_XbpGet') .OR. oXbp:isDerivedFrom('DC_XbpComboBox')) .AND. mp1 $ { xbeK_UP, xbeK_DOWN }
Re: Not move cursor from get
Posted: Thu Feb 25, 2016 5:24 am
by digitsoft
Hola Roger
I look at the Error
Re: Not move cursor from get
Posted: Thu Feb 25, 2016 5:27 am
by digitsoft
thanks roger
I solved the problem and the parameters are incorrect
STATIC FUNCTION myHandler (nEvent, mp1, mp2, oXbp, oDlg)
Re: Not move cursor from get
Posted: Thu Feb 25, 2016 5:40 am
by rdonnay
I solved the problem and the parameters are incorrect
Sorry. I forgot the order of the parameters.