How to set TrayItem tooltip throughout project?

First time using the Trayitem, so still trying to grasp everything. I’d like to change the Tooltip at various times when the app is running when conditions change. Inside the AppItem Class, I can get it to work using “me.Tooltip”. However, I can’t figure it out when trying to set it outside this class. I’ve tried App.Tooltip, AppItem.Tooltip, TrayItem,Tooltip among others. Nothing works. What am I doing wrong?

What is an AppItem?

I assume you create a DesktopTrayItem and add it to the app via app.AddTrayItem. If so, you need to keep a reference to the trayitem in a property of the app or a module and use that to change the text.

I’m using the example that Xojo includes under Desktop/TrayItem. So, the structure in my app is the same as that example. Everything is bundled under what appears to be a Class called “AppItem”. There is already a Property in the App called mAppItem set as type AppItem. I am unable to use it with anything. This is where I need help…how to reference the trayItem as you said. The structure is all there in the included XOJO example.

So you should have some code somewhere that says

app.mAppItem = New AppItem

and you should use app.mAppItem everywhere.

That worked! Thank you for your patience. I’m dipping into some new stuff with this project.