Interface object positioning

Support forum for MegunoLink
Rod
Posts: 10
Joined: Thu Jan 24, 2019 12:55 am

Sat May 04, 2019 10:19 pm

When using interface panel the position is given with an object. Is there a way to set a grid and have a "snap to grid". I seem to spend a lot of time lining up boxes and making them the same size.

Thanks in advance.

Rod
Mike-AU
Posts: 32
Joined: Wed Mar 13, 2019 12:03 am

Sun May 05, 2019 1:07 pm

Make them all the same size is easy just click on one and copy it and paste, you now have 2 the same size.
If you move one inline with the other, little blue lines appear when you are dead inline.

Also in the property window to the right, there is a line near the bottom, gives you height and width of the object, type the same numbers in from another box and the designer with auto size it for you.

Hope that helps.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Mon May 06, 2019 5:38 am

Thanks Mike, you can also hold down the Ctrl button and drag to make a copy.
Rod
Posts: 10
Joined: Thu Jan 24, 2019 12:55 am

Thu May 09, 2019 11:19 am

I do appreciate your suggestions but I must admit you guys must have better "mouse control" than I have. I seem to get one column "just right" and then decide to move it to the left "just a little". During the move, I manage to change the size of all of the objects.

A grid with a snap feature would really help. I know you can`t do everything and believe me when I say this is one heck of a program. Many, many features I have yet to explore.

If not a snap then perhaps a check box that says "freeze this objects' size".

Thanks again.

Rod
Mike-AU
Posts: 32
Joined: Wed Mar 13, 2019 12:03 am

Fri May 10, 2019 9:55 pm

Three things that are usefull for you in the situation you describe;-

The "undo" function in the edit tab
once you have an object where you want it, in the properties menu on the right hand side is a lock function. one you lock it
hell on earth wont move it till you unlock it again. However be aware the lock function only works for your current editing session.
If you shut the designer down and reopen it all locks are auto-reset to "off"
Not an insurmountable issue. Just put the mouse pointer top left of screen, hold down button, draw a box around everything on the screen.
Then in properties click "lock" and everything you included in the box you high-lighted is locked again.

And lastly , click "Apply" a lot, it kinda functions as a autosave.

I have 42 radio buttons in 21 paired boxes with 21 picture boxes under neath them, first thing I do is lock them every new session.

again hope that helps.
Mike.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sat May 11, 2019 1:29 am

Great advice Mike, I've added getting that lock function to persist to our request list (not sure why its not). We also longer term want to add undo and redo functionality (no small job I'm told). I think this would help in the situations when things are accidentally resized or edited.

Cheers
Phil
Rod
Posts: 10
Joined: Thu Jan 24, 2019 12:55 am

Fri May 31, 2019 10:30 am

Thanks so much. That lock function is a real time saver.

Rod
Mike-AU
Posts: 32
Joined: Wed Mar 13, 2019 12:03 am

Fri May 31, 2019 11:47 pm

Ok here we go with a few more hints

If you have several items in a row but you cant get the mouse to move them just a fraction, go to the properties menu, scroll down and find the position properties, or size property. It will be a two part number separated by a comma. EG 40,20 for a 40x20 pixel box. ( I think they pixels)
now if your 4 boxes show all the same numbers they are all the same size.

The same system works for fine tuning their positions as well . The mouse is great for roughing out the layout, the position tab is fantastic for getting it spot on.
Here is what it looks like when you fine tune your project, each item you see is its own box. I havent counted how many i have used :D
Mike
meguno.jpg
meguno.jpg (611.89 KiB) Viewed 15914 times
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sat Jun 01, 2019 1:51 am

Mike that interface is amazing! How did you do the cool relay buttons?
Cheers
Phil
Mike-AU
Posts: 32
Joined: Wed Mar 13, 2019 12:03 am

Sat Jun 01, 2019 7:46 am

The relay buttons were the easiest to do, they are just a pair of radio buttons, One sends a !RON 5\R the other a !ROFF 5\r command to turn pin x on or off on the arduino. The all on all off buttons just run a loop to set the 20 pins either high or low depending on the request.

When I have cleaned the code up better, I will post it here. Its a damn mess at the moment because as I learn more about Arduino and more about Meguno I find a lot of what I wrote before was not the most sophisticated way of doing things. So once it is all done I will rewrite it from scratch and make it neater and more professional.

Like i am trying to find a way to clear a text box back to blank, I am sure i read something somewhere in the docs but cant find it again.

Mike.
Post Reply