Code covered by the BSD License  

Highlights from
ScrollPanel

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 7.33 KB File ID: #29776
image thumbnail

ScrollPanel

by Jason Kinchen

 

18 Dec 2010

A ScrollPanel object that can contain lightweight Handle Graphics objects.

| Watch this File

File Information
Description

Standard Handle Graphics uipanels provide containment and groups axes and their children. The ScrollPanel provides the ability to define a scrollable area and the panel is the viewport onto that area.

Since Scrollpanel is not a built-in Handle Graphics object, objects must be parented to it explicitly. It has a 'handle' property for this purpose.

ScrollPanel does support the border properties of the uipanel object,
but in a slightly different way. The border of the ScrollPanel does not intrude upon the client area, but extends outward from it. The border of a panel is lightweight and would be obscured by the scrolling objects in the scroll area. The position of the object with the border may be set using the OuterPosition property.

An important point to note is that the ScrollPanel object has the same limitations as the Handle Graphics uipanel object which is used in its implementation. In terms of clipping. Heavyweight objects such as uicontrols will not be clipped and will scroll outside of the viewport.

Since scrolling will tend to move these heavyweight object outside the viewport position, care much be used to achieve the desired result.

The use of OpenGL and surface objects in general is also problematic since they are heavyweight. So, it is advisable to stick to 2D without transparency.

Acknowledgements

This file inspired Interactive Stack Graph.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File  
Everyone's Tags
gui(2), oop
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Contact us