I'm using KeyPressFcn for an edit control. The problem is that within
KeyPressFcn I need the actual String of the edit control _including_ the
last typed character. However, within KeyPressFcn I only can get the 'old'
value of the edit control before the key was pressed. This is of no use to
me... Does anybody know a workaround for this without writing a complete
interpreter for all keystrokes such that I have to calculate myself what the
new contents of the edit control will be?
"Jeroen Boschma" <no_mail@please.com> wrote in message
<470a0dd5$1@aurora.telecom.tno.nl>...
> Hi all,
>
> I'm using KeyPressFcn for an edit control. The problem is
that within
> KeyPressFcn I need the actual String of the edit control
_including_ the
> last typed character. However, within KeyPressFcn I only
can get the 'old'
> value of the edit control before the key was pressed. This
is of no use to
> me... Does anybody know a workaround for this without
writing a complete
> interpreter for all keystrokes such that I have to
calculate myself what the
> new contents of the edit control will be?
>
> Thanx,
>
> Jeroen
"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
news:fed4q6$d89$1@fred.mathworks.com...
> "Jeroen Boschma" <no_mail@please.com> wrote in message
> <470a0dd5$1@aurora.telecom.tno.nl>...
>> Hi all,
>>
>> I'm using KeyPressFcn for an edit control. The problem is
> that within
>> KeyPressFcn I need the actual String of the edit control
> _including_ the
>> last typed character. However, within KeyPressFcn I only
> can get the 'old'
>> value of the edit control before the key was pressed. This
> is of no use to
>> me... Does anybody know a workaround for this without
> writing a complete
>> interpreter for all keystrokes such that I have to
> calculate myself what the
>> new contents of the edit control will be?
>>
>> Thanx,
>>
>> Jeroen
>
>
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/151905
>
> Yair Altman
> http://ymasoftware.com
>
>
OK, thanks for the pointer Yair. I downloaded your 'findjobj' and try to
find out the essence of it so I can write a smaller version of the whole
underlying idea, for performance issues. Only need the single 'edit'-thingie
:-)
Jeroen
Tags for this Thread
Add a New Tag:
Separated by commas
Ex.: root locus, bode
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.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.