Sub TextChanged() Handles TextChanged
self.Changed = true
End Sub
This should be add a * to the window.title, but the event doesn’t show this.
Like:
Title with no changes: “My Application”
Title with changes: “My Application*”
Now I must use the ContentsChanged event to do this manually.
Sub ContentsChanged() Handles ContentsChanged
if self.Changed then
me.Title = “My Application*”
else
me.Title = “My Application”
end if
End Sub
Because I don’t believe there is a windows design guideline for the asterisk, different devs like to put it in different places. Some at the start so you can see it on the task bar, some after the app but before the filename and some at the end. Where as on the mac this will trigger the little dot on the close button.
Both TextChanged and ContentsChanged (with ending d’s) are 2019r2 Event names.
@Horst Jehle, if you are actively using 2019r2, please consider upgrading to 2019r2.1, which reverts your event names back to pre-API 2.0 standard names.
Not that upgrading will fix your problem, but r2 is a discontinued (for lack of a better word) version.
I have tested this missing feature with 2018R1.1, 2019RR2.1 and 2019R3FC4 and this feature is not available on Windows platform. I works on macOS.
Why this is not working on Window platform? The Xojo IDE shows a * in the window title on Windows platform, if you change an open project.
If you read Window.Changed, it only mentions giving a visual clue for macOS. As Norman says, you’ll have to code your own indicator for Windows apps, like they must have in the Xojo IDE.
Something like this, in the ContentsChange Event (untested):
#If TargetWindows
If Not Me.Changed Then
If Self.Title.Right(1) = "*" Then
Self.Title = Self.Title.Left(Self.Title.Len - 2)
End If
Else
If Self.Title.Right(1) <> "*" Then
Self.Title = Self.Title + " *"
End If
End If
#EndIf