Page 1 of 4

[ANN] bnGuides alignment tool on livecodeshare

Posted: Tue Dec 18, 2018 4:43 pm
by bn
I have put a stack "bnGuides" on livecodeshare (or access it from "Sample Stacks" from within LC).
It is best used as a plugin.

http://livecodeshare.runrev.com/stack/918/BnGuides

bnGuides.png

It helps with visual guides to align objects. It complements the build-in alignment tool.
Feedback welcome.

Kind regards
Bernd

Re: bnGuides alignment tool on livecodeshare

Posted: Tue Dec 18, 2018 5:19 pm
by bogs
This works very well, thank you Bernd!

If your coming from a VB or Delphi background, or any number of other IDEs which feature a visual alignment tool, I cannot recommend adding this to your plugins enough, it makes alignment and layout a snap.

I give it two big thumbs up and a crown!
ImageImage

Re: bnGuides alignment tool on livecodeshare

Posted: Thu Dec 20, 2018 9:01 am
by AndyP
This is excellent work...most useful.

I have this now set to start with LC, it should be a standard part of the LC ide.

Thank you.

Re: bnGuides alignment tool on livecodeshare

Posted: Thu Dec 20, 2018 9:19 am
by bn
Thank you Bogs and Andy,

I am glad you like it.

Kind regards
Bernd

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Thu Mar 28, 2019 10:42 pm
by bn
bnGuides has been updated to version 0.5.0

The update fixes some instances where graphics used by bnGuides were not properly removed from the target stack.

Additionally it adds the option to display distances to nearest neighbors when setting the capsLock-key.
Thanks bogs for suggesting "distances" and beta testing.

Please read the help file for more information.

As before bnGuides works from LC 5.5 and up. Use it as plugin.


guidePlusDistance.png
guides and distances
guidePlusDistance.png (16.08 KiB) Viewed 19895 times

You can download it from
http://livecodeshare.runrev.com/stack/918/BnGuides

or from within Livecode -> Sample Stacks

Kind regards
Bernd

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Thu Mar 28, 2019 10:52 pm
by bogs
< Rubbing my greedy lil hands together > Thanks Bernd! :mrgreen:

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Fri Mar 29, 2019 7:18 am
by Thierry
Hallo Bernd,


Was waiting for this kind of tool since such a long time....

sunnY- 2019-03-29 à 07.14.07.png

Congrats for this brilliant tool and thanks for my kids :)

mit freundlichen Grüßen,

Thierry

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Mon Apr 01, 2019 11:53 pm
by capellan
Hi Bernd,

Thanks a lot for updating your stack! :D

On Mac, I copy and pasted the stack plugin into
the LiveCode plugins folder but after opening
the plugin inside Livecode IDE, a message appears
asking me to put the stack inside the plugin folder.
Screen Shot 2019-04-01 at 6.45.29 PM.png
After clicking the button "Move me to plugin folder" then
this message appears:
Screen Shot 2019-04-01 at 6.46.21 PM.png
and finally, after closing and reopening LiveCode, the plugin now shows
this error:
Screen Shot 2019-04-01 at 6.46.59 PM.png
Al

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Tue Apr 02, 2019 12:05 am
by bn
Hi Al,

once you have put the stack into your plugins folder you should start the stack from the Development Menu -> Plugins.

What probably happened is that the stack is set up to move itself into the plugins folder if you start it from anywhwere except the plugins folder. That is where the installation routine tripped.

Does bnGuides work for you if you start it via Development -> PlugIns?

Kind regards
Bernd

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Tue Apr 02, 2019 1:43 am
by capellan
Hi Bernd,

The plugin does not work even if I start it from
the Plugin menu.

The error shows that a selected control
should have a script or a behavior named
"initializeScript" but I could not find this
in the selected control.

When does the selected control get this
script or behavior? When I click on them?

By the way, my Mac requires password to
install any software. Could this be the
source of this problem?

Al

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Tue Apr 02, 2019 8:52 am
by bn
The plugin does not work even if I start it from
the Plugin menu.
I have no idea why.
When does the selected control get this
script or behavior? When I click on them?
Yes, when you select a control it gets a behavior set, either the control if it has no behavior or the last behavior of the chain of behaviors of the selected control. The behavior button in bnGuides is "bnGuideBehavior2" = button id 1005.
By the way, my Mac requires password to
install any software. Could this be the
source of this problem?
I do not think so, once installed it should work.

I would try to delete bnGuides from the plugins folder and download a fresh copy. Install that manually into the plugins folder and try to start from Development - Plugins. For the first time start it when you are in browse mode. Though that should not make a difference.

It baffles me what happens to you. Maybe we can solve this.

Kind regards
Bernd

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Thu Apr 04, 2019 1:24 am
by capellan
Hi All,

bnGuides alignment tool is working fine now
in my own setup! :D

The culprit was that opencard handler was
not running when I opened the stack.

I changed opencard for openstack and
replaced the original script for a shorter
script that Bernd send to my email.

Many Thanks Bernd!

Al

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Sat Jan 02, 2021 2:48 am
by stam
Happy new year all!
sorry to resurrect this slightly older post...

First of all, kudos to Bernd, it's very impressive, really does work very well and brings in functionality that i think most new users would expect as default for the IDE. I wish this (or similar functionality) was actually part of the IDE -- is there any way to push for this?

Secondly, i had a request either for guidance or perhaps a new feature request for the plugin - alignment tools in almost all other IDEs/design software will both bring up alignment guides relative to other controls, but also relative to the window.

Is there any way to create an alignment guide for horizontal/vertical midlines of the stack window? I often find my self struggling to accurately align controls to the vertical or horizontal centre of the window.
IDEs for other platforms will also bring up a further window guide around the edges of the window (typically about 20 px from the edge) - this is often very helpful in lining up controls along either edge of the window (i currently keep having to adjust the pixels in the inspector which is not intuitive or quick...) - is there way to display a guide around the edges of the window?

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Sat Jan 02, 2021 10:41 am
by bn
Hi Stam,

Thank you for your kind words.
Have you tried the caps-lock key down? Then the distances to either the edges of the window or the next control are shown for the blue middle guide. (After clicking the the control you have to move the mouse 1 pixel to make the distances show up)
If the caps-lock key is not down only the vertical/horizontal middle of the card is shown when moving the control. Try with a single control to see the effect.

The caps-lock feature was introduced in version 0.5.0 of bnGuides which is the current version on livecodeshare/Sample Stacks.

As far as I understand that is what you would like to see added. If not please explain, preferably with a screenshot.

Kind regards
Bernd

Re: [ANN] bnGuides alignment tool on livecodeshare

Posted: Sat Jan 02, 2021 12:03 pm
by bogs
stam wrote:
Sat Jan 02, 2021 2:48 am
First of all, kudos to Bernd, it's very impressive, really does work very well and brings in functionality that i think most new users would expect as default for the IDE. I wish this (or similar functionality) was actually part of the IDE -- is there any way to push for this?
You and I are holding hands on that one, I think Bernd's guides plugin is the cat's meow for alignment, and say so anytime the chance too comes up!
stam wrote:
Sat Jan 02, 2021 2:48 am
Is there any way to create an alignment guide for horizontal/vertical midlines of the stack window? I often find my self struggling to accurately align controls to the vertical or horizontal centre of the window.
Of course, you have bnGuides! Merely drag your control towards the center of the window, and voila!
aPic_centerGuidelines.png
Center yourself....
aPic_centerGuidelines.png (4.56 KiB) Viewed 14926 times
stam wrote:
Sat Jan 02, 2021 2:48 am
IDEs for other platforms will also bring up a further window guide around the edges of the window (typically about 20 px from the edge) - this is often very helpful in lining up controls along either edge of the window (i currently keep having to adjust the pixels in the inspector which is not intuitive or quick...) - is there way to display a guide around the edges of the window?
Bernd himself has already answered this for bnGuides use, and further up on this page shows the distances being shown here, in the 5th post :mrgreen:

Without using bnGuides, though, you *could* still do it with a few commands (nowhere NEAR as easily or intuitively though).

Code: Select all

# from the message box 
-- center control in window, in this case a button...
    set the loc of button "button name" to the loc of card "card name" of Stack "stack name"
-- set the side of one control exactly the same distance as another control on the opposite side    
    set the right of button 1 to the (right of card 1 of Stack "stack name" -10)
    set the left of button 2 to the (left of card 1 of Stack "stack name" +10)
For me though, bnGuides does all this and more faster and easier when laying your design out.