The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Object movement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mike Buess

USA
3037 Posts

Posted - 04/23/2004 :  08:58:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I've drawn a line on a graph, named it and attached its script to Moved or Sized. Are there any flags available that describe the nature of the movement or sizing? For example, dragging one end of the line will change the length and slope whereas dragging a point in the middle will translate the entire line. Are there any built in properties or variables that can be used to tell the difference between the two actions?

Mike Buess
Origin WebRing Member

sammi.song

China
46 Posts

Posted - 04/26/2004 :  02:03:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike Buess,

Controls object edit states indicates the nature. This property is bit-oriented so that values can be added.
Example: Line.states=6, disables rotating and skewing for the object named Line.
0 = all controls are enabled.
1 = resizing is disabled.
2 = rotating is disabled.
4 = skewing is disabled.
8 = moving individual points is disabled.
16 = in place editing is disabled.
32 = resize text label border disabled.
64 = horizontal movement is disabled.
128 = vertical movement is disabled.

Not sure if this meet your expectations, but hope this helps.

Thanks,
Sammi
Go to Top of Page

easwar

USA
1965 Posts

Posted - 04/26/2004 :  10:03:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

The line.states property can only be used to restrict movements in various degrees of freedom by using the control bits described by Sammi above. It does not however let you determine what kind of movement was performed.

Currently there is no flag that tells you what movement was performed. But you could use the line.x1,x2,y1,y2,dx1,dx2,dy1,dy2 properties to figure that out? You could save the values each time and then check against saved values once the user completes the movement, to determine what changed.

Easwar
OriginLab

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 04/26/2004 :  12:39:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
But you could use the line.x1,x2,y1,y2,dx1,dx2,dy1,dy2 properties to figure that out? You could save the values each time and then check against saved values once the user completes the movement, to determine what changed.
That's what I'm doing now. Just wanted to be sure I wasn't overlooking an easier method.

Thanks Easwar and Sammi,

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000