필터 지우기
필터 지우기

How to set the event priority on GUI?

조회 수: 1 (최근 30일)
Volkan Kandemir
Volkan Kandemir 2012년 4월 1일
Hi everyone. Here is an basic but important question. Think about a GUI which have a textbox named as edit1 and let us add an event to this textbox by KeyPressFcn. When we press return key, KeyPressFcn will arise and gets the text of edit1. However on the same time edit1_Callback event will arise. By default KeyPressFcn event comes first. How can I change it?
By the way I solved my problem by removing KeyPressFcn event and moving both code under the event of edit1_Callback. Nevertheless, there should be property which users can manage the event priorities.

채택된 답변

Walter Roberson
Walter Roberson 2012년 4월 1일
There is no property to allow the relative priorities of the callbacks to be changed.
  댓글 수: 2
Volkan Kandemir
Volkan Kandemir 2012년 4월 1일
If so how Matlab decide which event comes first?
Walter Roberson
Walter Roberson 2012년 4월 1일
It is a matter which is not defined by Mathworks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by