Windows should be able to cancel a close operation #24

Closed
opened 2024-08-19 02:04:45 -06:00 by sashakoshka · 0 comments
Owner

Windows should have an TryClose event (or something) that fires when the user attempts to close the window. If the handler returns true, the window will be closed. If the handler returns false, the window will be left open. If there are multiple handlers, the window is only closed when all return true.

This can be used to display some sort of "Unsaved changes" warning to the user. The Close behavior should bypass this mechanism so it can be effectively used within such a dialog if the user wishes to close the window anyways.

Windows should have an TryClose event (or something) that fires when the user attempts to close the window. If the handler returns true, the window will be closed. If the handler returns false, the window will be left open. If there are multiple handlers, the window is only closed when all return true. This can be used to display some sort of "Unsaved changes" warning to the user. The Close behavior should bypass this mechanism so it can be effectively used within such a dialog if the user wishes to close the window anyways.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tomo/tomo#24
No description provided.