Code covered by the BSD License  

Highlights from
superSlider

5.0

5.0 | 1 rating Rate this file 15 Downloads (last 30 days) File Size: 5.81 KB File ID: #43285
image thumbnail

superSlider

by

 

03 Sep 2013 (Updated )

A flexible slider creation tool, that allows for multiple slides along a single axis.

| Watch this File

File Information
Description

I noticed a bunch of threads discussing multi-slide slider objects, but couldn't find any that suited my needs. I've tested this code on multiple platforms, but since this is my first posting attempt there may be incompatibilities - feel free to comment and let me know if you run into these or any other issues.

For a basic demonstration, create the following function and place it in the same folder as superSlider:
 _______________________________________________________________________________
% Demonstration of the superSlider "object". This function generates a new randomly oriented slider each time the callback is executed.

function sliderCallbackTest(hObject, eventData)

n = .1 + .8*rand(1); %random location for the new slider

% Recursive callback:
slider11 = superSlider(gcf, 'numSlides', 2,'controlColor',[.5 .1 .5],...
                    'position',[n .05 .05 .7],'stepSize',.1,...
                    'callback',@sliderCallbackTest);

Required Products MATLAB
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
03 Sep 2013 Curtiss

This works really great for my application!

Updates
23 Dec 2013

Fixed a small callback bug in line 537 of code (4th last line).
Changed from: "eval(callback);" to "eval(props.callback);"

15 Sep 2014

Another (larger) callback fix, to conform with MATLAB's standard callback format: function(hObject, eventdata, arguments), where the 'callback' parameter is set using the value: {@function, arguments} or just @function

Contact us