PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WM - Trabalhando com janelas internas - Working with internal windows, posicionando IW no centro e fechando usando indirection
WM - Trabalhando com janelas internas - Working with internal windows, posicionando IW no centro e fechando usando indirection
Iniciado por Boller, nov., 18 2021 3:22 PM - Sem resposta
Membro registado
3.651 mensagems
Popularité : +175 (223 votes)
Publicado em novembro, 18 2021 - 3:22 PM
Prezados,

WM - Trabalhando com janelas internas - Working with internal windows, posicionando IW no centro e fechando usando indirection:

Crie essa procedure

// Summary: <specify the procedure action>
// Syntax:
//CentralizaIW (<Janela>, <InternalWindow>, <exibe>)
//
// Parameters:
// Janela:
// InternalWindow:
// exibe: <specify the role of hideUnhide>

Procedure CentralizaIW(Janela,InternalWindow,exibe)

IF exibe = False THEN

{InternalWindow,indControl}..X = -2000

i is int = 1
ResChamp is string
sControle is string
ResChamp = EnumControl(Janela, i)

WHILE ResChamp <> ""
i++
//info(ResChamp)
sControle = Janela+"."+ResChamp
IF ResChamp <> InternalWindow
{sControle,indControl}..Grayed = False
END
ResChamp = EnumControl(Janela, i)
END

ELSE

nLarguraJanela is int = {Janela,indWindow}..Width

nLarguraIWindow is int = {InternalWindow,indWindow}..Width

{InternalWindow,indWindow}..X = (nLarguraJanela/2) - (nLarguraIWindow/2)

i is int = 1
ResChamp is string
sControle is string
ResChamp = EnumControl(Janela, i)

WHILE ResChamp <> ""
i++
//info(ResChamp)
sControle = Janela+"."+ResChamp
IF ResChamp <> InternalWindow
{sControle,indControl}..Grayed = True
END
ResChamp = EnumControl(Janela, i)
END

END



Ao abrir a janela coloque esse codigo para esconder a IW

CentralizaIW(MyWindow..Name,IWC_01..Name,False)


E para exibir a IW

CentralizaIW(MyWindow..Name,IWC_01..Name,True)






--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/