Creating a Button Group in Guide

I inserted a button group onto my GUI in Guide, but the functions controlling it did not show up in the Guide editor. I tried to just write the function like it should have been there, but the callbacks are not working.
Is there some way to force Guide to create a uipanel1_SelectionChangeFcn?

4 件のコメント

Walter Roberson
Walter Roberson 2012 年 7 月 26 日
Button groups are not uipanel, so uipanel1_SelectionChangeFcn would not be appropriate.
Caleb
Caleb 2012 年 7 月 26 日
I figured it out. I'm an idiot. Thanks for the help.
Sean de Wolski
Sean de Wolski 2012 年 7 月 26 日
@Walter, actually when a buttongroup is created in GUIDE, it does come out as a uipanel.
Open a blank guide gui, add a button panel, and view its SelectionChangeFcn
function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
% hObject handle to the selected object in uipanel1
Caleb
Caleb 2012 年 7 月 26 日
Right. I didn't know that I could insert callbacks from the guide window, but I found it and everything works now.

サインインしてコメントする。

回答 (1 件)

Sean de Wolski
Sean de Wolski 2012 年 7 月 26 日

0 投票

Right click on the uibuttongroup panel and select "View Callbacks" -> "SelectionChangeFcn".

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

質問済み:

2012 年 7 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by