Topic was automatically imported from the old Question2Answer platform.
Asked By
lxknvlk
I have made a PopupMenu and i have tried everything i could think of or find in google, still it is closing (hiding) when i click it with mouse
If you don’t want the menu to close, I’d guess that maybe you shouldn’t be using a PopupMenu in the first place. It’s really designed to work like a typical “context menu”, where it’s opened only upon request and then auto-hides.
What behavior do you need? Maybe a different container would serve your needs better - such as a simple Panel?
jgodfrey | 2020-03-18 23:09
@jgodfrey i need just to show a message window and close it manually after a delay
Turn off properties like “Hide On Item Selection” to disable it from hiding when clicking events happen inside the PopupMenu.
Turn off the property “Exclusive” will disable it from hiding when you click somewhere outside the PopupMenu.
none of that work
lxknvlk | 2020-03-19 07:38
This will work, but if you mean the very beginning before you open up the menu (Popup the menu), that’s a different thing. Popups need to be opened by calling function popup(). Turning on the property visible for Popup won’t make it visible in game.
After that, turing off the properties Hide On Item Selection, Exclusive, etc. is what will determine if it’s going to be hidden again when clicking events happens.
Once the popups are in the hidden state, it can be only opened again through popup(). Initially when running the game, they are in the hidden state.
For whoever comes here to find the answer now. I have set the Mouse > Filter to Ignore and it has worked for me. Even it has fixed cursor being removed when I drag the mouse away from LineEdit which is on the PopupMenu.