| MATLAB Central > MATLAB Newsreader > How do I give focus to a figure? |
|
|
|
Subject: How do I give focus to a figure? From: Jochen Smolka Date: 29 Oct, 2007 05:46:02 Message: 1 of 10 |
|
Hi, |
|
Subject: How do I give focus to a figure? From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) Date: 29 Oct, 2007 05:50:28 Message: 2 of 10 |
|
In article <fg3s2p$jgd$1@fred.mathworks.com>, |
|
Subject: How do I give focus to a figure? From: Jochen Smolka Date: 29 Oct, 2007 06:01:41 Message: 3 of 10 |
|
Thanks for your fast reply, |
|
"Jochen Smolka" <ja511@gmx.de> wrote in message |
|
|
|
Subject: How do I give focus to a figure? From: Jochen Smolka Date: 30 Oct, 2007 04:12:57 Message: 6 of 10 |
|
Thanks for your replies. |
|
Subject: How do I give focus to a figure? From: Arnaud Delorme Date: 3 Oct, 2008 06:57:02 Message: 7 of 10 |
|
I tried the solution with "buttonpressfunc" on an inactive button and this was not working. I guess the "buttonpressfunc" has to be caught at the figure level. Then you must determine if the mouse position is on top of the button. |
|
Subject: How do I give focus to a figure? From: Paul Devonshire Date: 25 Jun, 2009 16:31:01 Message: 8 of 10 |
|
figure(this.FigureHandle); |
|
I have solved this problem in the past by putting a call to my main figure keyPressFcn callback in each of the keyPressFcn callbacks of my buttons, etc. on the GUI. For example, here is an example key handler for any combination of key presses in the main GUI figure: |
|
Subject: How do I give focus to a figure? From: Jan Simon Date: 1 Sep, 2009 19:25:20 Message: 10 of 10 |
|
Dear Jochen Smolka! |
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.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| key handling | Ryan | 31 Aug, 2009 19:54:21 |
| gui | Ryan | 31 Aug, 2009 19:54:21 |
| keypressfcn | Ryan | 31 Aug, 2009 19:54:21 |
| keypressfcn | Jochen Smolka | 29 Oct, 2007 01:50:09 |
| figure | Jochen Smolka | 29 Oct, 2007 01:50:09 |
| focus | Jochen Smolka | 29 Oct, 2007 01:50:09 |
Contact us at files@mathworks.com
