Posicion de cursor o get en pantalla

Posicion de cursor o get en pantalla

Postby noe aburto » Wed Mar 09, 2016 5:32 pm

Saludos.

Dentro, de un dialogo tengo varios gets, e hice una función de búsqueda que añado a x get.
Mi problema es que quiero poner exactamente abajo de ese get un dialogo para filtrar los datos de búsqueda y no se como posicionar el dialogo justo en la parte izquierda e inferior del get sin importar en que parte coloco cada get.

Al estilo tooltip cuando pide el usuario me sugiere en la parte de abajo los usuarios ya registrados anteriormente.

Gracias.
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Posicion de cursor o get en pantalla

Postby noe aburto » Thu Mar 10, 2016 8:47 pm

Asunto arreglado:

Code: Select all  Expand view

//mi get en el dialogo
/*
   oGET[x]:=TGet():New(aGETS[x,gROW],;
                       aGETS[x,gCOL],;
                       {|u|If(PCount()==0,aGETS[x,gDAT],aGETS[x,gDAT]:=u)},;
                       if(lFOLDER,;
                          oFOLDER:aDialogs[COLU_NUM(x)],;
                          if(FORMATO_VENT=='P',oVENTANA,oDLG(1))),;
                       aGETS[x,gLAR],;
                       aGETS[x,gANC],;
                       aGETS[x,gPIC],;
                       {|val|val:=aGETS[x,gREQ].and.empty(aGETS[x,gDAT]),if(val,AVISO_REQ(x),.T.).and.eval(aGETS[x,gVAL])},nColorTxt,nColorPan,aGETS[x,gFON],.F.,,.T.,,.T.,;
                       {||COLU_BUS(x)[1]<>NIL.or.(lMODIFICA.and.eval(aGETS[x,gWHE]))},;
                       .F.,;
                       aGETS[x,gDER],,;
                       aGETS[x,gRED],.F.,.F.,,,,,,,{||MiBusqueda(aVent,oGET[x],x,COLU_BUS(x)[1],COLU_BUS(x)[2],COLU_BUS(x)[3])},xFile('GOFIND.BMP'))
*/


// --- Buscar en dbf con get activo
static function MiBusqueda(aVent,oGet,nGet,nOrden,cCampo,cTitulo)
local VentBusc,nOrdAnt,oBuscar,xBuscar,aRect,oRect,oWnd,nReg:=Recno()
local nRow,nCol,nLar,oDlg,oFont

if lALTAVENT.or.lMODIFICA
 return NIL
endif
aRect:=GetCoors(oGet:hWnd)
nRow:=aRect[1]
nCol:=aRect[2]
oWnd:=oGet:oWnd
oRect:=oWnd:GetRect()
nRow+=oRect:nTop-1
nCol+=oRect:nLeft-1
nLar:=aGETS[nGet,gLAR]
xBuscar:=Space(Len(oGet:cCaption))
nOrdAnt:=OrdSetFocus(nOrden)
DEFINE FONT oFont NAME "ARIAL" SIZE 0,SIZE_FONT_GETS BOLD
DEFINE DIALOG oDlg FROM 0, 0 TO aGETS[nGet,gANC]+4,nLar PIXEL;
           STYLE nOr( DS_MODALFRAME, WS_POPUP )
@ 0, 0 GETFWH oBuscar VAR xBuscar PICTURE aGETS[nGet,gPIC];
          SIZE aGETS[nGet,gLAR],nLar PIXEL COLOR COLOR_AZUL,COLOR_SAMARILLO OF oDlg
oBuscar:bChange:={|nKey|IF(nKey==VK_RETURN,oDlg:End(),NIL)}
oBuscar:SetFont(oFont)
ACTIVATE DIALOG oDlg ON INIT oDlg:Move(nRow,nCol)
oFont:End()
if GetAsyncKey(VK_RETURN)
 DBSeek(AllTrim(xBuscar),.t.)
 @ 0,0 inicia ventana VentBusc titulo "BUSQUEDA" largo 15 mover nRow,nCol
 opciones ventana VentBusc seleccionar
 columna ventana cTitulo en VentBusc variable '{||'+cCampo+'}' formato '@!'
 procesa ventana VentBusc
 if !KeyEnter(VentBusc)
  DBGoTo(nReg)
 endif
endif
OrdSetFocus(nOrdAnt)
DespVent(aVent)
return NIL
 
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests