Progress Bar Code

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Locked
User avatar
nerdgerl
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Progress Bar Code

Post by nerdgerl »

I had a difficult time figuring this one out because of the math -- not neobook. If you're looking for a progress bar, you may have success with the following.

1. Draw two rectangles. One is an outline and the other one sits inside of the outline. The interior rectangle is a solid color. For example's sake, let's call the interior rectangle "Rectangle6".

2. Rectangle6 should start out with a width of 1 or 0.

3. Inside of a loop function, include the code below:

Math "([Insert the length or width of the outlined rectangle here]*[variable counter])/[Whatever it is that you're measuring]" "0" "[Progress]"
SizeObject "Rectangle6" "[Progress]" "13"

In human speak, the above code multiplies the final length of the progress bar by the loop counter. Then it divides that product by what you're attempting to measure. I just wrote a program that had to monitor the number of lines counted in a file. So the value could be a constant, or a variable. It stores the final calculatiion into a variable named "Progress." Then it just sizes Rectangle6 according to the value stored in the "Progress" variable.

I don't see a place to attach fles here, so if anyone wants an example pub, just let me know.

NEW: Here's a download url: Progress Bar
Last edited by nerdgerl on Sun Nov 23, 2008 2:40 pm, edited 2 times in total.
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Post by Gaev »

nerdgerl"
I don't see a place to attach fles here
If you have a website (or other place to upload your pub), you can use the facilities of the NeoBook Resource Center (click on second image at top of this page) ... in my unscientific study, a lot more people visit the Center than do this Forum ... at least when looking to download files etc.

Reminds me ... I should upload an example pub of mine that does Progress Bars ... which I had made available in the (now discontinued) website run by rcohen ... using Text Boxes ... and a font which has a character that displays a solid rectangle ... you can display the Progress Bar as a series of tiny colored boxes ... both horizontally and vertically ... of course you can get whimsical and use any character that looks like a fancy design ... for example the smiley face in the WingDings font.
User avatar
nerdgerl
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Post by nerdgerl »

Gaev wrote:nerdgerl"
I don't see a place to attach fles here
If you have a website (or other place to upload your pub), you can use the facilities of the NeoBook Resource Center (click on second image at top of this page) ... in my unscientific study, a lot more people visit the Center than do this Forum ... at least when looking to download files etc.

Reminds me ... I should upload an example pub of mine that does Progress Bars ... which I had made available in the (now discontinued) website run by rcohen ... using Text Boxes ... and a font which has a character that displays a solid rectangle ... you can display the Progress Bar as a series of tiny colored boxes ... both horizontally and vertically ... of course you can get whimsical and use any character that looks like a fancy design ... for example the smiley face in the WingDings font.
Thanks Gaev, I'll check it out.
You know me. You may not know it yet. But you know me.
Think DOS. Think NeoBook. Think iGui.
Light
Posts: 38
Joined: Tue Nov 27, 2007 7:47 am

Re: Progress Bar Code

Post by Light »

NEW: Here's a download url: Progress Bar

Thank you :)
User avatar
Claude GUYOT
Posts: 225
Joined: Sun Oct 01, 2006 10:05 am
Location: France

Thank you

Post by Claude GUYOT »

Génial.
Thank you
User avatar
nerdgerl
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Post by nerdgerl »

Hi.

I noticed through my server logs that several people are still looking for this file. I switched servers and forgot all about it, but have uploaded a new version. It is now again available: here
You know me. You may not know it yet. But you know me.
Think DOS. Think NeoBook. Think iGui.
johnpalm
Posts: 57
Joined: Thu Dec 09, 2010 5:06 pm

Thanks for reposting the Progress Bar Pub

Post by johnpalm »

Just wanted to say thanks, it was just what I needed to make a more professional looking pub.

John
asawyer13
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm

Post by asawyer13 »

@nerdgerl
Looks like the link has been broken again.
Alan
asawyer13
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm

Post by asawyer13 »

I was able to get it this morning, so the link is back.
Alan
Locked