Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!newsfeed.news.ucla.edu!nrc-news.nrc.ca!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: How do I give focus to a figure?
Date: Mon, 29 Oct 2007 05:50:28 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 24
Message-ID: <fg3sb4$9aa$1@canopus.cc.umanitoba.ca>
References: <fg3s2p$jgd$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1193637028 9546 192.70.172.160 (29 Oct 2007 05:50:28 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Mon, 29 Oct 2007 05:50:28 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:435000



In article <fg3s2p$jgd$1@fred.mathworks.com>,
Jochen Smolka <ja511@gmx.de> wrote:

>in my application I have a large number of buttons and an
>axis object in a figure. After each button press I would
>like to return focus to the figure, so that key presses are
>evaluated by the figure's KeyPressFcn. Is there a way to do
>this programmatically?

Possibly,

set(0,'CurrentFigure',figurenumber)

This will not raise the figure like  figure(figurenumber)  would.


I'm not sure from your question: do you have a single figure
which contains the GUI and the axis object both? Or do you have
two figures, one with the GUI and the other one the one that
contains the axis object that you want to give control over to?
-- 
   So you found your solution
   What will be your last contribution?
   -- Supertramp (Fool's Overture)