Prev: I have a question on how I can prevent clicks/pause while trying to play a looped audio file (created in matlab) continuously. tia sal22
Next: DISSERTATION HELP (9212652900) India, Dissertation UK, Plagiarismfree Diss
From: wma on 8 Feb 2010 05:30 Hello, is there a possibility to hide (disable) a jlabel which is created like this: global output global jLabel global hcomponent global hcontainer output = '<html><p>test</p></html>'; jLabel = javaObjectEDT('javax.swing.JLabel',output); [hcomponent,hcontainer] = javacomponent(jLabel,[10,10,610,420],gcf); i already tried jLabel.list but i cannot find anything. I have several menuitems where i have to switch the text inside the label. I need rich-text functions so i have to use something like jlabel right? Does anyone can paste code for jtextea ?
From: Yair Altman on 8 Feb 2010 05:50 "wma " <wma(a)wma.test> wrote in message <hkop3d$19a$1(a)fred.mathworks.com>... > Hello, > > is there a possibility to hide (disable) a jlabel which is created like this: > > global output > global jLabel > global hcomponent > global hcontainer > output = '<html><p>test</p></html>'; > jLabel = javaObjectEDT('javax.swing.JLabel',output); > [hcomponent,hcontainer] = javacomponent(jLabel,[10,10,610,420],gcf); > > i already tried > > jLabel.list but i cannot find anything. > > I have several menuitems where i have to switch the text inside the label. > I need rich-text functions so i have to use something like jlabel right? > > Does anyone can paste code for jtextea ? 1. Use the UIInspect utility to understand which methods and properties are available on your object: http://www.mathworks.com/matlabcentral/fileexchange/17935-uiinspect-display-methodspropertiescallbacks-of-an-object . In your specific case, there are separate properties (and accessor methods) for hiding/showing and for enabling/disabling. 2. Dynamic menu items were explained here: http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/ 3. Rich-text in Matlab text-areas (editboxes) was explained here: http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/ Yair Altman http://UndocumentedMatlab.com
From: wma on 9 Feb 2010 14:01 > 1. Use the UIInspect utility to understand which methods and properties are available on your object: http://www.mathworks.com/matlabcentral/fileexchange/17935-uiinspect-display-methodspropertiescallbacks-of-an-object . In your specific case, there are separate properties (and accessor methods) for hiding/showing and for enabling/disabling. > 2. Dynamic menu items were explained here: http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/ > 3. Rich-text in Matlab text-areas (editboxes) was explained here: http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/ > > Yair Altman > http://UndocumentedMatlab.com Thank you for your answer. thank you for this very interesting tool Im still stuck here: I created an object like this: introtext=uicomponent('style','JLabel','Text',output,'Position' [10,10,610,420],'Tag','introtext'); at a later point i want to delete or "unvisible" it, how do i manage to delet this object? set(handles.introtext,'Visible','off') does not work.
From: Yair Altman on 9 Feb 2010 14:24
"wma " <wma(a)wma.test> wrote in message <hksbe1$5d2$1(a)fred.mathworks.com>... > > 1. Use the UIInspect utility to understand which methods and properties are available on your object: http://www.mathworks.com/matlabcentral/fileexchange/17935-uiinspect-display-methodspropertiescallbacks-of-an-object . In your specific case, there are separate properties (and accessor methods) for hiding/showing and for enabling/disabling. > > 2. Dynamic menu items were explained here: http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/ > > 3. Rich-text in Matlab text-areas (editboxes) was explained here: http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/ > > > > Yair Altman > > http://UndocumentedMatlab.com > > Thank you for your answer. thank you for this very interesting tool > > I'm still stuck here: > > I created an object like this: > introtext=uicomponent('style','JLabel','Text',output,'Position',[10,610,420],'Tag','introtext'); > > at a later point i want to delete or "unvisible" it, how do i manage to delete this object? > > set(handles.introtext,'Visible','off') does not work. set(introtext,'visible','off') works for me. In your case, handles.introtext may be an empty or invalid handle - set a breakpoint and check. To completely delete the label, simply do delete(introtext), just like for any other Matlab control. As before, you need a valid handle or else it will not work. Yair Altman http://UndocumentedMatlab.com |