Why window.change doesn't show a * in window.title?

Platform Windows10 Enterprise 64Bit

If I change a value in a TextField, I use this:

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

Here, with (and 2015r1), I have TextChange (without ending d

Good point Emile.

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 hope that helps.

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.

My memory tells me the IDE does it manually :slight_smile:

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
  If Self.Title.Right(1) <> "*" Then
    Self.Title = Self.Title + " *"
  End If
End If

Windows has no “default contents changed marker” like macOS does with the black dot in the close pill

So you have to do something for yourself in the event - just like the IDE does