PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y 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, 18,nov. 2021 14:22 - No hay respuesta
Miembro registrado
3.352 mensajes
Popularité : +89 (91 votes)
Publicado el 18,noviembre 2021 - 14:22
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/