From: matt dash on 27 Apr 2010 12:46 "Yair Altman" <altmanyDEL(a)gmailDEL.comDEL> wrote in message <hr5ati$nv8$1(a)fred.mathworks.com>... > "matt dash" <n.a(a)mail.com> wrote in message <hr4sjh$f78$1(a)fred.mathworks.com>... > > Ohhhh I know all about this problem. The short answer is, no, there is no way to partially hide a uicontrol behind anything other than another uicontrol, and even that is unpredictable. Uicontrols are basically java swing controls and they are all drawn in a layer that is above the layers used by normal matlab graphics objects. Similarly you can't partially hide an mtable or an mtree, cause those are also java objects. > > > > You can do what you suggested and have them discretely appear/disappear as they cross the border, but that can make it look amateurish. Another alternative is to draw everything using matlab graphics objects in an axes. > [snip] > > > You can take a snapshot image of all the uicontrols and replace the controls with their image. Something similar is done by Matlab when it prints figures. This way, the uicontrols are really small images that can indeed be partially obscured. If you only hide the controls during scrolling and unhide them immediately afterwards, you should be ok with user interaction (mouse clicks etc.). You can use my ScreenCapture utility on the FEX to get the image of any specified uicontrol (there might be alternatives - I haven't checked). > > It's not simple to do correctly, but it's also not rocket science. > > BTW: I think that a generic scrollbar utility using the ideas in this thread could be a blockbuster on FEX... Anyone pick the challenge? > > Yair Altman > http://UndocumentedMatlab.com Rachel - I sent you an email with the files. Let me know if you didnt get it. Yair - Looks like your ScreenCapture is similar (though much more extensive) to my getscreen. I never thought of using it to try to solve the uicontrol problem. I agree a scroll pane utility would be nice to have... I wish I had the time to make a good one.
First
|
Prev
|
Pages: 1 2 Prev: pairing up parameters in a 361x2 matrix Next: RS 232 to MATLAB Problem |