马上加入,结交更多好友,共享更多资料,让你轻松玩转电力研学社区!
您需要 登录 才可以下载或查看,没有账号?立即加入
×
GUI41.rar
(105.3 KB, 下载次数: 1)
; K0 X3 X1 \! i8 F0 J
Thanks for the original code provider.Almost cover all processes of creating a ideal GUI.
, G. W$ Q; w7 S2 [) C2 a6 R2 eHere, I share it to enhance together.4 Z+ L/ H5 x; t. b1 t, E
This file was selected as MATLAB Central Pick of the Week
: G/ J' Y f8 {8 ?; d& S# eThe questions answered include:$ W0 Z1 R; s' r' @/ L* O, \
1.How do I manipulate the strings in a uicontrol? GUI_1, 2, 4, 5, 13, 14, 15, 20, 21, 22, 37 " r/ {. t& L8 |$ J8 g. v3 C
2.How do make a uicontrol invisible/visible? GUI_3, 35 (See also GUI_10 for images) $ W B* q4 ^8 I4 O+ B- e6 }6 |3 S
3.How do I make a multi-line edit box? GUI_4 0 S& y9 A, {+ I* `' w& ~! c; I2 ^
4.How can I initialize an editbox so that the cursor is blinking at startup? GUI_4, 24, 37 - S( F/ t/ j3 _
5.How can I let the user of my GUI know his actions are futile (or producing no results)? GUI_5
% w! o( N! P+ n; d6.How can I tell which uicontrol is selected e.g., radiobuttons? GUI_6, 8
! U* a9 f6 G, j9 M4 R: r7.How do I tell how many times a uicontrol has been activated? GUI_7, 19, 28, 32, 33 , } U4 F6 n- H! U
8.How do I tell which button in a buttongroup is selected? GUI_8
3 H* w- w; W; W3 y- v, T2 t' `9.How do I let the user know a process is running in the background? GUI_9 . Y/ ^1 B- @( D) w
10.How can I set an image visible/invisible? GUI_10 ; U6 O5 F p3 I3 y
11.How can I use a GUI to exit a FOR loop? GUI_11 3 }0 Y4 D- }8 g; `# |- H" H; t' Y; S
12.How can I control the mouse pointer with a GUI? GUI_12 7 ]/ p8 I$ W1 F T, f" y+ q W
13.How do I access the value (current position) of a slider? GUI_13, 16 3 e& C6 z6 G/ I
14.How do I use different colored strings in a listbox? GUI_14 8 u& h0 j2 j, k4 r
15.What is the difference between 'listboxtop' and 'value' in a listbox? GUI_14
) t/ E! N* [$ ~* R' P16.How do I make text that can be copied but not changed? GUI_15
2 U4 y" J# q5 ~7 }8 P5 e$ S17.How can I allow the user of my GUI to set the range of a slider? GUI_16
4 e. _, F4 |! Y, w18.How can I display a digital clock in my GUI? GUI_17 . ^) o0 W2 `; r) S# i' X9 E
19.How can I use a timer in a GUI? GUI_17
( {4 Z% E T8 T* r) P: B/ z6 F) P20.How do I use the buttondownfcn on an axes object? GUI_18, 28 }) K5 Z# _" p9 u) f3 r- L( c
21.How do I make a callback talk to another callback? GUI_19 9 k2 s0 Y; M) E2 u% r
22.How can I get the string from a popup or listbox? GUI_14, 20, 21, 22, 31, 32, 33
. Y1 z' S2 n- Y0 F# E23.How can I set the string in a popup or listbox? GUI_21, 22 + P; i( Y6 _0 P/ N$ ?
24.How can I add to the string in a popup or listbox? GUI_22 ' J7 m6 f9 |3 E
25.How do I tell which figure/axes was current before my callback executed? GUI_23
7 N' w z' W: B% p* S26.How do I get data from another GUI? GUI_24 0 s' x4 {6 |4 o& j2 x" W
27.How do I make a GUI to open image files only? GUI_25 7 k' |) h. w+ o: ^
28.How can I make popup choices mutually exclusive? GUI_26
2 o# [/ D6 y, b6 Q/ a29.How can I show the current pointer location in axes coordinates? GUI_27
* Q1 `2 r1 z# a) @. {% n3 M6 D* [6 S30.How can I use uicontextmenus? GUI_28, 33, 39 ; M0 u& q% I" N) H
31.How do I make my GUI control an axes in another figure? GUI_29, 30 $ k6 `) M" K r: E4 _4 N
32.What are callback strings? GUI_30 . R, k3 c7 f, N; i, [- @
33.How can I make it so that when one of the figures closes, they all close? GUI_24, 29, 30, 41 5 O, }% P& q3 O# j( w& Q0 {$ G
34.How do I make several uicontrols interact in a more complicated GUI? GUI_31, 32, 33, 41 # q; w1 ?: }" H, Z3 r5 |8 d
35.How do I get data from a GUI to the base workspace? GUI_25, 32, 33, 36
# J0 h% \8 b8 W36.How can I use a GUI to take a screenshot of my desktop? GUI_34
) Q4 h' Y: u2 ?9 z5 c37.How do I make toggle buttons act like tabbed-panels? GUI_35
1 h9 J3 w3 L5 U G3 |5 I+ z& K38.How do I make a custom dialog box which returns a string to the base workspace? GUI_36 7 r6 g1 D# [0 |0 x
39.How can I make a password editbox that has the ***** symbols? GUI_37
0 D* g4 W0 S6 P& s6 q$ {7 k7 L40.How can I use nested function as callbacks? GUI_11, 17, 34, 36, 37, 39, 40, 41. ; c" `' p9 i9 `
41.How can I use uiwait in a GUI? GUI_11, 34, 36, 37 ( r! B9 [2 q Q" c3 T$ L
42.How do I use JAVA in my GUI? GUI_38
0 u I! z# U7 N8 g43.How do I force the figure to maintain focus between uicontrol activations? GUI_38 6 m4 @, }$ [- ?' m U# U% i
44.How do I save an axes as an image? GUI_39 7 S8 A" j; s8 ^* `$ z: z7 Z) O
45.How can I make a simple drawing program? GUI_39 ' N- r0 f6 _4 K3 X; w& Q4 U; ~
46.How can I set a button's background to match an image? GUI_40
0 B: x- a5 R- T- Z47.How can I save the state of a system of GUIs to use later? GUI_41! {1 i* [1 O2 ? q0 i3 [
I am open to hearing any suggestion as to other questions which could be covered in the collection. Such suggestions need not be basic. Please read the pdf file prior to use. Also the contents.m file contains brief descriptions of each GUI.8 C3 k" \5 @, o3 Q9 L& }. }9 Y
Please email me if an error is found, either in the documentation or coding. Thanks!7 [8 L& l8 e2 C$ F6 I
Acknowledgements | |+ w' m5 `, f. [. n! j6 Y! N6 i
This submission has inspired the following:9 A* W7 \6 n7 c7 m
Matlab to Google Spreadsheets, StackSlider, Virtual Painting | MATLAB release | MATLAB 7.5 (R2007b) |
|