Author Topic: "On drop" events  (Read 2931 times)

0 Members and 1 Guest are viewing this topic.

kiler40

  • Sr. Member
  • ****
  • Posts: 328
"On drop" events
« on: August 14, 2013, 12:09:04 AM »
Hello everybody!

I`m trying to accomplish something.
I want to assign to a shape "on drop" event. But for the moment nothing happens
I want to drop a shape from a stencil, and the shape automatically to take the page width, and to go on bottom of the page (like footer, but a complex one)

So please - can anyone help ? :)
« Last Edit: August 14, 2013, 01:22:43 AM by kiler40 »

Yacine

  • Hero Member
  • *****
  • Posts: 2703
Re: "On drop" events
« Reply #1 on: August 14, 2013, 01:45:24 AM »
You are probably making a frame.
In the EventDrop cell you'll write a serie of "setf(getref(" statements, separated by "+".
The setf(getrefs will modify the width, height, pinx and piny cells.
You may also want to protect those cells by guard statements.
HTH, Y.
Yacine

kiler40

  • Sr. Member
  • ****
  • Posts: 328
Re: "On drop" events
« Reply #2 on: August 14, 2013, 02:00:15 AM »
Yes, this i have come to solution... but i`m using SETF()&SETF()&....
But how to find the bottom of the page :)

Thanks for the quick response

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: "On drop" events
« Reply #3 on: August 14, 2013, 02:21:05 AM »
Quote
EventDrop=SETF("width",ThePage!PageWidth)+SETF("piny",ThePage!PageHeight)+SETF("pinx",0 mm)

kiler40

  • Sr. Member
  • ****
  • Posts: 328
Re: "On drop" events
« Reply #4 on: August 14, 2013, 03:08:00 AM »
Thank you. that worked. had to add the page margins por position, and to remove from width 2* pagemargin (because i have to printi it in the end :) )
But thanks.

I have another question, if i have one page in portrait and one page in landscape, if i do the same opraration to send the shape in the top of the page, for portrait works perfect, for landscape sends it in the position of portrait...
can this be fixed ?

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: "On drop" events
« Reply #5 on: August 14, 2013, 03:46:49 AM »
try this way please
Quote
=SETF("width","=guard(ThePage!PageWidth-ThePage!PageLeftMargin-ThePage!PageRightMargin)")+SETF("piny","=guard(ThePage!PageHeight-thepage!PageLeftMargin)")+SETF("pinx",ThePage!PageWidth*0.5)+SETF("LocPinX",Width/2)

kiler40

  • Sr. Member
  • ****
  • Posts: 328
Re: "On drop" events
« Reply #6 on: August 14, 2013, 04:03:08 AM »
WOW :)
Thanks A LOT !