PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 25 → Tab dinamica
Tab dinamica
Iniciado por Boller, 14,dic. 2023 15:48 - No hay respuesta
Miembro registrado
4.521 mensajes
Publicado el 14,diciembre 2023 - 15:48
Procedure Abre_TabDynamic(sWindowName is string<window name>, sCaption, *)

sAlias is string = sWindowName+"|"+sCaption

// CTRL key down
bEnabled is boolean = NOT KeyPressed(kpControl)

// current pane
sCurrentAlias is string = TAB_GLOBAL


// disables the display
MyWindow.DisplayEnabled=False

IF TAB_GLOBAL.Visible = False THEN
TAB_GLOBAL.Visible = True
END

// if the pane does not exist yet
IF TabStatus(TAB_GLOBAL,sAlias) = paneNotFound THEN
// open a new pane
NewTab is Control <- TabOpen(TAB_GLOBAL,sCaption,sWindowName,MyParameters[3 to])
// NewTab is Control <- TAB_MENU.Open(sCaption, sWindowName, MyParameters[3 to])
NewTab..Alias = sAlias

// otherwise, enable the tab
ELSE IF bEnabled
TAB_GLOBAL = sAlias
END

// if the pane must not be enabled (CTRL key down)
IF NOT bEnabled THEN
TAB_GLOBAL=sCurrentAlias
END

// enables the display
MyWindow.DisplayEnabled=True




Abre_TabDynamic(IW_MEDICAO_FATOR_ABATIMENTO,"ABATIMENTOS MEDIÇÃO")




muda o TAB_GLOBAL pelo nome de seu TAB


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