News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Auto positioning?

Started by visiorookie, July 16, 2008, 11:15:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visiorookie

Hi everybody,

I am comming up with a question about some basic stuff I guess (my handle says it all...).
Well, am trying to set an auto positioning for a frame-shape - how can I do this?

Lars-Erik

You will have to be a little more specific on what you want to do, what the end result should look like.

- Lars

visiorookie

Thanks for the reply.
The end result should be that I pull a shape onto my sheet and then it should jump in a predestinated position.

Lars-Erik

You could do this with VBA. A shape can use the OnDrop event to call a macro.
Call("Macro") will call the macro and pass along the shape name.

Maybe this topic can help you:
http://visguy.com/vgforum/index.php?topic=196.0

vojo

if destination known/fixed....could use setatref(...) functions in pinx, piny.
Something like

      on drop =  setf(getref(user.dropflag),1)
      pinx = if(user.dropflag =1 , setatref(blah blah blah)+setf(getref(user.dropflag),0),)

this approach works for aligning a shape on drop on a given grid (i do it for isometric grids)
though it is somewhat simpler than this.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 204 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1054KB.
Tokens: post-login.
Cache hits: 13: 0.00190s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]