How to show a * (asterisk) in Application Title when document has changed and is not saved
I have a MDI Application with one MDI child.
When a user changes a Textbox on the MDI child, the MDI child (= document) is changed and is not saved. I want this to be visible in the Titlebar of the Application, like this:
ApplicationName [DocumentName*]
When the users saves the Document and doesn't change anything after, it should display:
ApplicationName开发者_JS百科 [DocumentName]
How can I achieve this?
You need a "document modified" flag. Then in your code that pulls out the document name to display in the title you can check this and if the document has been modified append "*".
精彩评论