About this: Displaying Nextion text fields for MMDVMHost ...

All things relating to the Nextion Screen(s)
Post Reply
oz1cbk
Posts: 57
Joined: Wed Apr 11, 2018 11:59 am

About this: Displaying Nextion text fields for MMDVMHost ...

Post by oz1cbk » Fri Oct 18, 2019 2:52 pm

Hi KE7FNS.
It's just brilliant to make such a file. Thank you. It is really useful. Now you have a little chance of doing something yourself :-)
I downloaded the file into a Nextion 5.0 "and it seems to work.
I just have a problem and it's the letters are too small, I struggle to see what it says.
And I can't seem to make them a little bigger.
Is there anyone who can explain how to do it so even I can understand it.
This is written in Danish and translated with Google translate.

Regards Ole - OZ1CBK.

KE7FNS
Posts: 409
Joined: Wed Apr 17, 2019 11:11 pm

Re: About this: Displaying Nextion text fields for MMDVMHost ...

Post by KE7FNS » Fri Oct 18, 2019 9:41 pm

To make the fonts larger requires a lot of manual work in the Nextion editor. I hope you understand that in order to make my file compatible with every Nextion screen I was limited to using the biggest size that would fit on the smallest screen 2.4-2.8.

If I were to make a screen that was resized for every sized screen out there, I would need to make 5 individual .hmi's and that would be many hours of repeated work. That just isn't something I'm interested in doing at all.

I wish the Nextion editor was designed better, where it would automatically scale up the design for larger screens, or scale down for smaller screens and also provide the ability to load different sized graphics for the individual screens. Unfortunately it is the only screen creation tool we have and we are limited by its lacking design.

First you need to resize the font, this is similar to my post on how to fix corrupted fonts here.
viewtopic.php?f=20&t=2014

Then you need to manually resize and reposition EVERY field on every page. You'll need to change the 'h' and 'w', and then both the 'x' and 'y'.

There is some simple math that you can use to figure out where the new position would be on a 5 inch screen:

To calculate the new 'x' and 'w' position you take the value of its initial position and multiply it by 2.5.
To calculate the new 'y' position you take the value of its initial position and multiply it by 2.
The new 'h' value is going to be relative to whatever font size you choose.

If I was going to attempt to recreate what you want for a 5" Nextion, I would probably just start over instead of resizing everything. I would complete the MMDVM page to my liking (referencing the field names and positions in the smaller .hmi), and clone that page to the other pages and then rename and delete the unneeded fields.

You could significantly cut down the time involved by eyeballing the sizes and positions, but that kind of unorganized mess where things don't remotely line up causes me to cringe. It is one of the main reasons I use my own screens instead of the popular ones.

I hope a translation works, good luck.
All views, comments, posts and opinions shared are entirely my own.

oz1cbk
Posts: 57
Joined: Wed Apr 11, 2018 11:59 am

Re: About this: Displaying Nextion text fields for MMDVMHost ...

Post by oz1cbk » Sat Oct 19, 2019 10:51 am

Thank You.
Now I really have something I can work with :-)
I see it is at lot of work, but its ok when I can se thing changes.
I will try to make a window so I can se how it works,
Thank You very much.

Ole - OZ1CBK.

Post Reply