How to Call Context Menu from Inside a Rectangle?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Rightia Rollmann
el 26 de Feb. de 2017
Respondida: Greg
el 26 de Feb. de 2017
To call the context menu, I have to right-click exactly on the outline of the circle. Is there any way to call the rectangle where ever inside it? I want it so, because it is more convenient.
hfig = figure;
hax = axes('XLim', [0 3], 'YLim', [0 3]);
c = uicontextmenu;
hr = rectangle('Position',[ 1 1 1 1],...
'Curvature', 1,...
'Parent', hax,...
'UIContextMenu', c);
m1 = uimenu(c);
0 comentarios
Respuesta aceptada
Greg
el 26 de Feb. de 2017
If you set the FaceColor of the rectangle, the uicontext menu works anywhere inside. Be aware that this may complicate other things you're trying to do.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!