Hola:
Me gustaría saber si se puede poner el botón en el GET en Fivewin.

Muchas gracias. Salu2
Me gustaría saber si se puede poner el botón en el GET en Fivewin.

Muchas gracias. Salu2
Saludos,
Eduardo
Eduardo

//en las datas:
DATA lNoBorderBtn
//luego:
METHOD New( nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,;
nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel,;
cMsg, lUpdate, bWhen, lCenter, lRight, bChanged,;
lReadOnly, lPassword, lNoBorder, nHelpId,;
lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName, lNoBorderBtn ) CONSTRUCTOR
//Luego:
METHOD ReDefine( nId, bSetGet, oWnd, nHelpId, cPict, bValid,;
nClrFore, nClrBack, oFont, oCursor, cMsg,;
lUpdate, bWhen, bChanged, lReadOnly,;
lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName, lNoBorderBtn ) CONSTRUCTOR
//luego:
METHOD New( nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,;
nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel, cMsg,;
lUpdate, bWhen, lCenter, lRight, bChanged, lReadOnly,;
lPassword, lNoBorder, nHelpId, lSpinner,;
bUp, bDown, bMin, bMax, bAction, cBmpName, lNoBorderBtn ) CLASS TGet
//luego:
nRow := 0, nCol := 0, lNoBorder := .f.,;
bSetGet := bSETGET( cText ),;
lNoBorderBtn := .f.
//luego:
::bAction = bAction
::cBmpName = cBmpName
::lNoBorderBtn = lNoBorderBtn
//luego
METHOD ReDefine( nId, bSetGet, oWnd, nHelpId, cPict, bValid, nClrFore,;
nClrBack, oFont, oCursor, cMsg, lUpdate, bWhen, bChanged,;
lReadOnly, lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName, lNoBorderBtn ) CLASS TGet
//luego:
nClrBack := GetSysColor( COLOR_WINDOW ),;
lUpdate := .f., lReadOnly := .f., lSpinner := .f.
lNoBorderBtn:=.f.
//luego:
::cBmpName = cBmpName
::lNoBorderBtn = lNoBorderBtn
//finalmente:
IF ::lNoBorderBtn
IF Empty( ::cBmpName ) //no hay bmp
@ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL TRANSPARENT
::oBtn:SetText( "..." )
ELSE
/*
@ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL BITMAP ::cBmpName
*/
IF At( ".", ::cBmpName)<>0 //si es .bmp
@0, ::nwidth - ::nHeight BTNBMP ::oBtn OF Self;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
FILE ::cBmpName ;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL NOBORDER TRANSPARENT
ELSE //si es un bmp
@0, ::nwidth - ::nHeight BTNBMP ::oBtn OF Self;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
RESOURCE ::cBmpName;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL NOBORDER TRANSPARENT
ENDIF
ENDIF
ELSE
if Empty( ::cBmpName )
@ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL
if Empty( ::oBtn:hBitmap )
::oBtn:SetText( "..." )
endif
else
@ 0, ::nWidth - ::nHeight BUTTONBMP ::oBtn OF Self ;
ACTION ( Eval( oThis:bAction, oThis ), oThis:SetFocus() ) ;
SIZE ::nHeight - 4, ::nHeight - 4 PIXEL BITMAP ::cBmpName
endif
ENDIF
//Saludos mgsoft y jose
actualmente la clase TGet cuenta con otras caracteristicas tambien, entre las cuales esta el ajuste automatico de boton y hacerlo transparente
DATA lAdjustBtn
Por favor, revisa samples\testget2.prg.
para hacerlo transparente solo usas oGet:lBtnTransparent = .t.
Razón adicional para actualizar mi versión de FWH.... Muchas gracias!!
Tambien tiene otra particularidad que es llenar el get completamente
revisa este post viewtopic.php?p=77451#p77451

Muchas gracias a todos ![]()
Y que es lo que no se puede hacer con Fivewin ![]()
Limite... ? La imaginación , jejejeje