PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → How to prevent the current tab Tab to Close
How to prevent the current tab Tab to Close
Started by Carlos, Jan., 02 2021 3:42 PM - 1 reply
Posted on January, 02 2021 - 3:42 PM
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
Posted on January, 05 2021 - 1:32 PM
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