When the cSeek is empty it must not show any button
when the user insert any digit it must show the button and the bitmap
How resolve it?
- Code: Select all Expand view
- #include "FiveWin.ch"
function Main()
local oDlg,oGet
local cSeek:= Space(100)
DEFINE DIALOG oDlg TITLE "Test"
@ 1, 1 GET oGet VAR cSeek SIZE 50,10 PIXEL OF oDlg ;
BITMAP ".\bitmaps\elimina.bmp";
ACTION (cSeek := Space( 100 ),;
oGet:refresh()) ;
oGet:lBtnTransparent :=.t.
oGet:bChange := { ||ChangeGetBtn(oGet,cseek) }
oGet:bKeyDown := { ||ChangeGetBtn(oGet,cseek) }
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oGet:cBmpName:="",oGet:oBtn:hide())
return nil
//----------------------------------------------------------------------//
Function ChangeGetBtn(oGet,cseek)
IF EMPTY( cseek )
oGet:oBtn:hide()
oGet:cBmpName:=""
* oGet:Refresh()
ELSE
oGet:oBtn:show()
oGet:cBmpName:=".\bitmaps\elimina.bmp"
oGet:Refresh()
ENDIF
return .t.