PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to prevent the current tab Tab to Close
How to prevent the current tab Tab to Close
Iniciado por Carlos, 02,ene. 2021 15:42 - 1 respuesta
Publicado el 02,enero 2021 - 15:42
Hi and thanks for the Help in advanced.

How can I prevent the user to close the tab

For example

If the User clicks on the Tab (X) to close it

Thank you

Best regards
Carlos
Publicado el 05,enero 2021 - 13:32
In the 'Closing a pane of DynTab' enter code that equates to...
IF DynTab..Value = "ALIAS_2" THEN
ReturnToCapture()
END


Of course it is necessary to know the alias and for this I store, based on a condition, the alias of created tab(s) in a global array.
When the user attempts to close a tab my code is similar to...
n_SeekRes = ArraySeek(arrAlias,asLinear,DynTab..Value)

IF n_SeekRes > 0 THEN
ReturnToCapture()
END