BTNBMP design ?
BTNBMP design ?
Antonio, a classe BTNBMP não conta com a opção DESIGN?
Obrigado
Obrigado
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Asi no lo puedes hacer. Tienes que usar "detached locals":
Code: Select all
for i:=1 to len(PoBtc)
@ lin,col say PoBtc[i] OF oWndp DESIGN PIXEL SIZE 100,20 BORDER
PoBtc[i]:bLButtonUp = GenBlock( PoBtc, i )
next
...
static function GenBlock( PoBtc, i )
return { || PoBtc[ i ]:Refresh(), MsgInfo( "aqui" ) }
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Pruébalo así:
Code: Select all
for i:=1 to len(PoBtc)
@ lin,col say PoBtc[i] PROMPT "say" OF oWndp DESIGN PIXEL SIZE 100,20 BORDER
PoBtc[i]:bLButtonUp = GenBlock( PoBtc, i )
PoBtc[i]:lWantClick = .T.
next
...
static function GenBlock( PoBtc, i )
return { || PoBtc[ i ]:Refresh(), MsgInfo( "aqui" ) }
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Tienes que hacer una modificación en la Clase TControl para poder procesar bLButtonUp estando en modo diseño:
Code: Select all
METHOD LButtonUp( nRow, nCol, nKeyFlags ) CLASS TControl
...
if GetFocus() != ::hWnd
SetFocus( ::hWnd )
endif
if ! Empty( ::bLButtonUp ) // Nuevo!
Eval( ::bLButtonUp, nRow, nCol, nKeyFlags, Self ) // Nuevo!
endif // Nuevo!
return 0
...
Olá Antonio,
No meu caso, uso assim e funciona perfeitamente.
Isto estaria correto também ?
Abraços,
Rossine.
No meu caso, uso assim e funciona perfeitamente.
Code: Select all
...
if GetFocus() != ::hWnd
SetFocus( ::hWnd )
endif
** return 0 <<-- Tirar esta linha
endif
return Super:LButtonUp( nRow, nCol, nKeyFlags )
Abraços,
Rossine.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: