Unofficial Nextion/TJC User Forum

Setting item layering order

I am running a code based on a touch event on the screen. I have discovered that if I touch the screen where there is a text box, the touch event code doesn’t run. Apparently the touch event only occurs when you touch a part of the screen where there is no other object. Is there a way of bringing the screen to the front so that touching anywhere on the screen will activate the code?

Not sure what you expected but Nextion will always run the event of whatever component is currently visible (topmost) at the point you pressed the screen. To bring a component to the top you can use the ref command (details as always in the instruction set).


Thanks. I never would have looked in the code. I kept looking in the object properties.

This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).