Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to use selectmoveresize ?

Subject: How to use selectmoveresize ?

From: Yoav Rubin

Date: 19 Nov, 2007 10:25:14

Message: 1 of 2

Hi All,

I draw a rectangle and set its ButtonDownFcn to be
selectmoveresize using the call:
set(rectHandle,'ButtonDownFcn','selectmoveresize');

but when I press the button on the rectangle, nothing
happends, what am I missing here?

thanks
Yoav

Subject: How to use selectmoveresize ?

From: Terry

Date: 4 Feb, 2009 17:09:02

Message: 2 of 2

"Yoav Rubin" <yoavrubin@hotmail.com> wrote in message <fhroa9$psa$1@fred.mathworks.com>...
> Hi All,
>
> I draw a rectangle and set its ButtonDownFcn to be
> selectmoveresize using the call:
> set(rectHandle,'ButtonDownFcn','selectmoveresize');
>
> but when I press the button on the rectangle, nothing
> happends, what am I missing here?
>
> thanks
> Yoav

Here's a quick code snipet that might help. I create a simple list box for resizing, moving, etc.

hf=figure('Pointer','cross','Name','selectmoveresize example','Position',[50 50 500 500]);
TestString='one|two|three|four|five';
list_box = uicontrol(hf, Style','Listbox','Units','Normalized','Enable','inactive',...
                           'Position',[.85 .8 .15 .2],'string',TestString);
A=selectmoveresize;
set(list_box,'ButtonDownFcn','selectmoveresize');

When you run this you should be able to resize the list box after clicking on it.

Hope this helps!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us