フィルターのクリア

R2014b, where'd 'TitleHandle' go? uipanel

3 ビュー (過去 30 日間)
Christopher
Christopher 2014 年 10 月 9 日
コメント済み: Christopher 2014 年 10 月 9 日
Hello,
I'm developing a GUI and recently updated to 2014b. I was using
hTitle = get(handles.uipanel,'TitleHandle');
newPos = get(hTitle,'position') + [0,0,20,0];
set(hTitle,'style','checkbox','Callback', {@Adv1_SelectionCb,handles},'pos',newPos);
which successfully converted the title of a uipanel to a checkbox. In 2014b however, there is no longer access to the hidden property "TitleHandle". I tried a few different ways to findobj() for this handle but have not been successful.
>> How can I gain access to a uipanel title handle, so that I may change the style to ___ (check/radio/..) <<
Thank you!

採用された回答

Doug Hull
Doug Hull 2014 年 10 月 9 日
編集済み: Doug Hull 2014 年 10 月 9 日
clear
close all
panel = uipanel('position',[0.5 0.5 0.2 0.2],'parent',gcf)
cbox = uicontrol('style', 'checkbox', 'String', 'sneaky')
cbox.Position = [290 285 60 20]
This is proof of concept for what you want.
  2 件のコメント
Christopher
Christopher 2014 年 10 月 9 日
Thanks!
Visually this solve this problem. However, I wonder if there's a way to link position of these two? If not, I assume I'll have to include a resize function that places the checkbox based on the panel Position
Christopher
Christopher 2014 年 10 月 9 日
nvm, figured it out,. just switch Units on checkbox to normalized, and match
Thank you!

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

その他の回答 (1 件)

Doug Hull
Doug Hull 2014 年 10 月 9 日
This undocumented feature has been removed in r2013b. You can access the title when you have the handle to the uipanel. However, the ability to change the titles type to checkbox is not possible.
What are you trying to accomplish, maybe there is a different User affordance that is supported and will do the same thing.
  1 件のコメント
Christopher
Christopher 2014 年 10 月 9 日
Thank you for your response Doug,
I was using it in r2014a until today and it was working fine. I'm creating a database report generator, and using a uipanel to block things to filter things. (best explained through picture). I realize I could just have a separate checkbox and my input, but I strongly preferred using the checkbox in the title to keep things compact and clean. Is there a way I can accomplishing something similar to this?

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

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by