Custom Graph Background Image Drag ResetHi,
Given a custom graph box with background image and handle script, is there a way to prevent the user from accidentally dragging the background image when they miss the handle? The problem I have is that frequently when trying to drag the handle I or another user will miss click and wind up dragging the background image instead. There's no easy way to undo this, Ctrl+Z just rescales the image to its original size (not to the size of the graph box). My question is this: Is there a way to force a background image in a graph box to be un-draggable? Or, failing that, is there a way to capture Ctrl+Z to undo this mis-click? Worst case scenario I can add a button, but its UI clutter I don't want.
Example
img = New Image( "$SAMPLE_IMAGES/tile.jpg" );
scale_factor = 0.5;
curimg_scaled = img;
curimg_scaled << Scale( scale_factor );
{scaled_width, scaled_height} = curimg_scaled << Size;
XX=scaled_width/2;
YY=scaled_height/2;
gb = Graph Box(
<<ADD image="">scaled_width,scaled_width,x<1,1,x);
YY = If(y>scaled_height,scaled_height,y<1,1,y);,
//mouseupscript -- update profile plots
XX = Round( XX );
YY = Round( YY );
// DO STUFF
txt = Eval Insert( "(X,Y)=(^XX^,^YY^)" );
Print(txt);
tb_xy << Set Text( txt );
);
H Line( YY );
V Line( XX );
);
New Window("Test",V List Box(gb,tb_xy=Text Box("")));</ADD>
Mass CustomizationRe: Custom Graph Background Image Drag ResetI started by right clicking on the image to see if there was a Lock option there.

Then I searched the Scripting Index (Help->Scripting Index) for Lock, and I found it on the PictSeg object.

I then experimented to see if I could use it on the Add Image() message directly as I showed you above.
Re: Custom Graph Background Image Drag ResetThanks a bunch Jeff! Is that option to the image message documented? I must’ve missed it.Re: Custom Graph Background Image Drag ResetYou can lock the image.
img = New Image( "$SAMPLE_IMAGES/tile.jpg" );
scale_factor = 0.5;
curimg_scaled = img;
curimg_scaled << Scale( scale_factor );
{scaled_width, scaled_height} = curimg_scaled << Size;
XX = scaled_width / 2;
YY = scaled_height / 2;
gb = Graph Box(
<<ADD image=""> scaled_width, scaled_width,
x < 1, 1,
x
);
YY = If(
y > scaled_height, scaled_height,
y < 1, 1,
y
);,
//mouseupscript -- update profile plots
XX = Round( XX );
YY = Round( YY );
// DO STUFF
txt = Eval Insert( "(X,Y)=(^XX^,^YY^)" );
Print( txt );
tb_xy << Set Text( txt );
);
H Line( YY );
V Line( XX );
);
New Window( "Test", V List Box( gb, tb_xy = Text Box( "" ) ) );</ADD>