fgondi wrote:Antonio,
Se sabe algo de este tema?
Es algo que puede ser desarrollado? o implica muchos problemas
#include "fivewin.ch"
#xcommand @ <nRow>, <nCol> BUTTON [ <oBtn> PROMPT ] <cCaption> ;
[ SIZE <nWidth>, <nHeight> ] ;
[ ACTION <uAction> ] ;
[ <default: DEFAULT> ] ;
[ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
[ FONT <oFont> ] ;
[ <pixel: PIXEL> ] ;
[ <design: DESIGN> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
[ WHEN <WhenFunc> ] ;
[ VALID <uValid> ] ;
[ <lCancel: CANCEL> ] ;
[ ON INIT <uInit> ] ;
=> ;
[ <oBtn> := ] TButton():New( <nRow>, <nCol>, <cCaption>, <oWnd>,;
<{uAction}>, <nWidth>, <nHeight>, <nHelpId>, <oFont>, <.default.>,;
<.pixel.>, <.design.>, <cMsg>, <.update.>, <{WhenFunc}>,;
<{uValid}>, <.lCancel.>, [{|Self|<uInit>}] )
#command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <pict: PICT, PICTURE> <cPict> ] ;
[ VALID <ValidFunc> ] ;
[ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ FONT <oFont> ] ;
[ <design: DESIGN> ] ;
[ CURSOR <oCursor> ] ;
[ <pixel: PIXEL> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
[ WHEN <uWhen> ] ;
[ <lCenter: CENTER, CENTERED> ] ;
[ <lRight: RIGHT> ] ;
[ ON CHANGE <uChange> ] ;
[ <readonly: READONLY, NO MODIFY> ] ;
[ <pass: PASSWORD> ] ;
[ <lNoBorder: NO BORDER, NOBORDER> ] ;
[ <help:HELPID, HELP ID> <nHelpId> ] ;
[ ACTION <uAction> ] ;
[ BITMAP <cBmpName> ] ;
[ CUEBANNER <cCueText> ] ;
[ ON INIT <uInit> ] ;
=> ;
[ <oGet> := ] TGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
[<oWnd>], <nWidth>, <nHeight>, <cPict>, <{ValidFunc}>,;
<nClrFore>, <nClrBack>, <oFont>, <.design.>,;
<oCursor>, <.pixel.>, <cMsg>, <.update.>, <{uWhen}>,;
<.lCenter.>, <.lRight.>,;
[\{|nKey, nFlags, Self| <uChange>\}], <.readonly.>,;
<.pass.>, [<.lNoBorder.>], <nHelpId>,,,,,, [\{|self| <uAction> \}], <cBmpName>, <"uVar">,;
[<cCueText>], [{|Self|<uInit>}] )
//----------------------------------------------------------------------------//
function Main()
LOCAL oDlg, b, d := Date(), g
DEFINE DIALOG oDlg FROM 10,10 TO 30,30
@ 1,2 BUTTON "UNO" OF oDlg ACTION ( b:enable(), g:show() )
@ 3,2 BUTTON b PROMPT "DOS" OF oDlg ON INIT ::disable()
@ 6,2 GET g VAR d OF oDlg PICTURE '@d' ON INIT ::hide()
ACTIVATE DIALOG oDlg
return NIL
Aeval( ::aControls,{|o| IF( o:bInit != NIL , Eval( o:bInit, o ), NIL ) } )
if ::bInit != nil
lResult = Eval( ::bInit, Self )
if ValType( lResult ) == "L" .and. ! lResult
lFocus = .f.
endif
endif
if ::bInit != nil
lResult = Eval( ::bInit, Self )
if ValType( lResult ) == "L" .and. ! lResult
lFocus = .f.
endif
endif
METHOD Initiate( hDlg ) CLASS TControl
DEFAULT ::lActive := .t., ::lDrag := .f., ::lCaptured := .f.,;
::lFocused := .f., ::lCancel := .f., ::lTransparent := .f.
if( ( ::hWnd := GetDlgItem( hDlg, ::nId ) ) != 0 )
If( ::lActive, ::Enable(), ::Disable() )
::Link()
if ::oFont != nil
::SetFont( ::oFont )
else
::GetFont()
endif
else
#define NOVALID_CONTROLID 1
Eval( ErrorBlock(), _FWGenError( NOVALID_CONTROLID, "No: " + ;
Str( ::nId, 6 ) ) )
endif
if ::lTransparent
::SetBrush( ::oWnd:oBrush )
endif
if ::bInit != nil
Eval( ::bInit, Self )
endif
return nil
Return to To do - WishList / Por hacer - Peticiones
Users browsing this forum: No registered users and 9 guests