开发者

How to show a * (asterisk) in Application Title when document has changed and is not saved

开发者 https://www.devze.com 2022-12-12 12:10 出处:网络
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 A

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 "*".

0

精彩评论

暂无评论...
验证码 换一张
取 消