Source language: Translate to:

Progress Bar Code

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

Moderator: Neosoft Support

Progress Bar Code

Postby nerdgerl » Wed Oct 01, 2008 3:09 am

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
nerdgerl
 
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Postby Gaev » Wed Oct 01, 2008 5:35 am

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
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby nerdgerl » Wed Oct 01, 2008 11:51 am

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.
User avatar
nerdgerl
 
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Re: Progress Bar Code

Postby Light » Wed Oct 01, 2008 2:36 pm

NEW: Here's a download url: Progress Bar



Thank you :)
Light
 
Posts: 38
Joined: Tue Nov 27, 2007 7:47 am

Thank you

Postby Claude GUYOT » Wed Oct 01, 2008 6:59 pm

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

Postby nerdgerl » Sat Jan 01, 2011 11:30 pm

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.
User avatar
nerdgerl
 
Posts: 33
Joined: Sat Sep 06, 2008 3:13 pm
Location: USA

Thanks for reposting the Progress Bar Pub

Postby johnpalm » Mon Jan 31, 2011 4:39 pm

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

John
johnpalm
 
Posts: 57
Joined: Thu Dec 09, 2010 5:06 pm

Postby asawyer13 » Mon Jan 31, 2011 7:37 pm

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

Postby asawyer13 » Tue Feb 01, 2011 3:22 am

I was able to get it this morning, so the link is back.
Alan
asawyer13
 
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: Bing [Bot] and 1 guest