Antonio Linares wrote:You may try this:
oDlg:bLostFocus := { || oDlg:SetFocus() }
Antonio Linares wrote:Francisco,
oDlg:Capture()
function SelecionaFormaDePagamento( )
local oFonte, oFonte2, oDialog, oLabel, nFormaSelecionada, hButton := HB_Hash()
Define Font oFonte Name 'Arial' Size -0,20 bold
Define Font oFonte2 Name 'Arial Black' Size -0,22// bold
Define dialog oDialog resource "SELECIONADEBCRE" title "Gerenciador TEF -- PAGAMENTO" font oFonte
oDialog:lTransparent := !IsAppThemed()
redefine say oLabel id 5001 of oDialog color CLR_HRED ,CLR_WHITE font oFonte2
redefine buttonbmp hButton['CartaoDebito' ] bitmap "CARTAO" id 6001 of oDialog action( nFormaSelecionada := CARTAO_DEBITO_A_VISTA , oDialog:End() ) textright
redefine buttonbmp hButton['CartaoCredito'] bitmap "CARTAO" id 6002 of oDialog action( AcaoBotaoCredito( @nFormaSelecionada, oDialog ) ) textright
redefine buttonbmp hButton['Encerrar' ] bitmap "M_EXIT" id 6003 of oDialog action( oDialog:End() ) textright
oDialog:lHelpIcon := .f.
oDialog:bKeyDown := {| nKey | FuncaoTeclas( nKey, hButton ) }
activate dialog oDialog centered on init ( OnInit( oLabel, oDialog ) )
oFonte:End()
oFonte2:End()
return nFormaSelecionada
/******************************************************************************/
static procedure OnInit( oLabel, oDialog )
oLabel:SetText(CRLF+'Escolha a opcao desejada.')
oLabel:lTransparent := .f.
oLabel:SetColor( CLR_HRED ,CLR_WHITE )
ForcaJanelaAparecer( oDialog )
oDialog:Capture()
return
/******************************************************************************/
static procedure AcaoBotaoCredito( nFormaSelecionada, oDialog )
if SelecionaCreditoAVistaOuPrazo( @nFormaSelecionada )
oDialog:End()
endif
return
/******************************************************************************/
static procedure FuncaoTeclas( nKey, hButton )
if nKey == 49
hButton['CartaoDebito' ]:Click()
elseif nKey == 50
hButton['CartaoCredito']:Click()
elseif nKey == VK_F11
hButton['Encerrar' ]:Click()
endif
return
Antonio Linares wrote:Are you using STYLE DS_SYSMODAL to create it ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 63 guests