Component IDs changes "randomly" and I found myself every time re-assigning them in my main program after fetching new component ids, it would be very practical if these Ids could be set manually.
We are looking for a way to solve this issue.
Or maybe better the other way round - return the ID of a component known by name, as the name does not change. A possibly syntax - consistent with everything - would be
So just make id a "green member" ;-)
Just out of curiousity tried and realized, THIS ACTUALLY ALREADY WORKS !!!!!
Ahh, finally I seem to understand the way the component attributes work.
- Attributes with gray blackground are not readable nor settable.
- Those in black text are requestable but not changable
- Those in green can be read and written.
OK, I'm still a rookie on the Nextion...
I am now reviewing all of the Feature Requests, this will take some time, patience please.
By manual, using Bring Bottom/Bring Top has been implemented
The Page Component is always component .id 0
Each of the remaining components is number sequentially in the internal lookup table
Bring Bottom will set the component id to 1
Bring Top will set the component id to last (number of components on the page).
In the attribute pane in the editor, you can see the sequential order by pulling the dropdown down
You can also use Ctrl+click to select more than one component for Bring Bottom / Bring Top.
In this fashion, the component .ids can be ordered how you prefer.
Besides simple numbering, this sequence is the order items are refreshed in a page ref
This can play an important role if trying to layer,
- where one component is behind another, it should have a lower .id number.
PS: Layering is not recommended as it often results in flickering.
Do not do this from the dropdown box.
If I right-click an item in the design area of the screen, hold control and right-click another
- I will have two items selected, continue this pattern - I can select many
On the tool bar at the top of the Nextion Editor window,
- Arrow Up (Bring top) will set the id of the selected component to the last id (# of components)
- Arrow Down (Bring bottom) will set the id of the selected component to 1
I have designed a display with multiple pages, but each page id is 0.
when i need to communicate this display with my MCU how will it distinguish 2 component having same id and name but are on different pages.
or is there any other way to assign id to a page.