Re: [問題]關於GUI問題

看板MATLAB作者 (想買D2000...)時間13年前 (2013/02/17 23:44), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
先用inputdlg問要幾個edit 再用迴圈產生edit prompt = 'Enter a Number :'; dlg_title = 'Enter a Number :'; num_lines = 1; def = {'1'}; answer = inputdlg(prompt,dlg_title,num_lines,def); answer=str2double(answer{1}); step=30; % edit彼此的間隔 pos=[10 10 60 20]; % 第一個edit的位置與大小 for i=1:1:answer cc=uicontrol('Style','Edit','Position',pos); pos=get(cc,'Position'); pos(2)=pos(2)+step; % 向上堆疊edit end ※ 引述《chenmish (arlibuda)》之銘言: : 我想設計一個GUI,當輸入一個變數N後,會再產生N個edit讓我輸入變數, : 一直想不出要怎麼設計,也有找了幾本書,但都是滿基本的設定, : 希望有人能指導我一下,感謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.110.228.232

02/18 08:16, , 1F
可以了,感謝你~
02/18 08:16, 1F
文章代碼(AID): #1H8Fhpao (MATLAB)
討論串 (同標題文章)
文章代碼(AID): #1H8Fhpao (MATLAB)