Let me see if I can explain this.

I have a window where I am setting the titlebar property dynamically (i.e. C100345 Grinder). When I switch to another machine, it shows the correct text (C100400 Broach).

The application titlebar shows the incorrect name though. For instance, if I saved the window in the designer while C100345 Grinder was selected, it will stay at C100345 Grinder even when the Broach is selected. So, the operator sees two different labels at the same time, which is obviously confusing.

How can I control the app titlebar text? Also, while I’m at it, is there a way to change the color of the window titlebar? I must be missing some window settings somewhere.

What did you use to implement this, did you use binding/scripting? Also, to be clear, you have multiple components on the same window, and when you click on one of those components, the window titlebar needs to change, is that correct?

As far as changing the titlebar color, that can’t be changed. The color of the titlebar and border are controlled by the look and feel of your OS.

I used expression binding on the titlebar property. So, when a user selects a different machine, all of the components point to the new machine id, and the titlebar changes.

If the main app titlebar remained static, that would be fine too, but it always grabs the value of the titlebar when the window first opened. I really don’t want to close and reopen the window each time, since that would make the system look sluggish.

Use the “internalFrameOpened” event handler on the window, and use the following script:

event.source.title = "Your Window Name"

This should ensure that the intial window titlebar (and the main app titlebar) will be what you expect when the window is initially opened. Even if you have something selected in the designer, and push a new save to the client, the client should initially have the scripted title name as the window name.

That doesn’t seem to work. As soon as I leave the page and come back, the app window and titlebars are different again. I put the script in both the opened and activated events.

Yeah, that makes sense considering the expressions…they probably just overwrite whatever changes the script makes. Can you export the window in question and email it to support at inductiveautomation dot com so I can take a look at it?

Sure, but I don’t know how it’ll work without the database connections. I’ll send what I have, and if you think a gotomeeting is better, we can do that too.

It appears that the custom properties “Machine” and “BTNumber” drive the title property, so I simulated changes to the “Machine” property, and had no problems with the titlebar. I don’t know how many tables are referenced by this window, but if it’s easy to figure out and send those tables in, that would be great. If not, you can just call in at (800) 266-7798 and setup a GoToMeeting with one of the tech support reps.

The titlebar works fine for me too, but the problem is that the main app titlebar doesn’t change with it. So, I could have one machine name on the window titlebar, and a different machine name on the app titlebar.

I’ll just send you a backup of the database and whole project. That will have everything you need to make the screens operable.

Travis and I both looked over this and it looks like it is a bug. The main app titlebar should register a listener with the window titlebar, so that it updates in tandem with the window titlebar. I will submit this request to our development team.

Unfortunately, the only thing I can suggest for now is to not bind anything to the title text property. You can create your own titlebar component that sits at the top of the screen that “mimicks” the functionality of a real window titlebar. The main app titlebar would only change when a window gains focus, however, not whenever a machine is changed.