CitizenInsane
CitizenInsane

Reputation: 4855

Matlab - Waitbar with marquee style

Problem

I'm looking for a improved waitbar in matlab that supports for marquee style.

Sample syntax I'd like to have:

smartWaitbar(6/12, 'Step 7/12...'); % Ratio € [0.0 1.0] ==> Normal display
smartWaibar(NaN, 'Connecting to database...'); % ratio = NaN ==> Marquee style 

Sample display I'd like to have:

enter image description here

NB1: I searched file-exchange but did not found what i was looking for.

NB2: If it does not exist yet, I'll probably create my own waitbar using winforms.

Upvotes: 2

Views: 1155

Answers (2)

Daniel Pereira
Daniel Pereira

Reputation: 421

Take a look at mywaitbar on matlab central file exchange. I created this waitbar just to add customized modes to the waitbar.

You can find the code at:

http://www.mathworks.com/matlabcentral/fileexchange/46896-mywaitbar

Click on the description's image to see it in action.

I solved the "cirular scroll" or "marquee style" with a timer function that updates the position of the bar, depending on the figure handle passed to the timer function and the number of timer steps that have been done.

Hope it helps.

Upvotes: 2

bla
bla

Reputation: 26069

check out the entry about setting status-bar components in Yair Altmans blog "undocumented Matlab" http://undocumentedmatlab.com/blog/setting-status-bar-components

Upvotes: 2

Related Questions