better progress bar

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Thu Jan 27, 2022 7:57 pm


richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Thu Jan 27, 2022 7:59 pm

SShot 2022-01-27 at 20.56.38.png
Attachments
PROGRESS.livecode.zip
Here's the stack.
(2.13 KiB) Downloaded 91 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: better progress bar

Post by dunbarx » Thu Jan 27, 2022 8:58 pm

Richmond.

Smooth and compact.

But the OP wanted a scrollBar, not a progressBar. I assume the scrollbar is operated under mouse control.

@Samuele. Is that so?

Craig

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: better progress bar

Post by Klaus » Thu Jan 27, 2022 9:07 pm

Hi Craig,

no, Samuele changed his mind in the middle of this thread:
viewtopic.php?f=7&t=36697#p212388

Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: better progress bar

Post by dunbarx » Thu Jan 27, 2022 9:41 pm

no, Samuele changed his mind in the middle of this thread:
All true, alas.

I still made a do-it-yourself scrollbar, just to see how it plays out. It was easy to get 90%. Not sure it is worth it anymore to get 100. There are glitches at the extreme ends. Likely the "mouseMove" message is just too ubiquitous.
RollYourOwnProgress.livecode.zip
(1.52 KiB) Downloaded 81 times

Craig

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: better progress bar

Post by Samuele » Thu Jan 27, 2022 9:59 pm

is there something for android mobile?
Thanks!
Samuele.

RogGuay
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Fri Apr 28, 2006 12:10 am
Location: Seattle

Re: better progress bar

Post by RogGuay » Fri Jan 28, 2022 5:58 am

As others have suggested, you can roll your own. Some ideas might present themselves by having look at ScrollBarOmatic and RadialDialOmatic available in Sample Stacks.

Cheers,

Roger

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: better progress bar

Post by Klaus » Fri Jan 28, 2022 1:39 pm

Samuele wrote:
Thu Jan 27, 2022 9:59 pm
is there something for android mobile?
Thanks!
Sure, take a look here: https://developer.android.com/design

As you can see from Richmonds example stack, you basically change the width of any object
(image/button/graphic/even a field etc.) you use as the "progress bar" according to the current "progress".

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Fri Jan 28, 2022 5:49 pm

What difference is there between the progress bar
I ran up (extremely quickly because it is extremely simple)
and one for Android?

I see no great difference between milking a cow
and milking a goat, and learning how to milk a
cow should provide you with a transferrable skill.

This makes me think of children who come to my
EFL school and are either unable or not prepared to
make an effort to reason by analogy, but just want to
be spoon-fed prepackaged answers. I generally ask
them to leave after a while.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: better progress bar

Post by jacque » Fri Jan 28, 2022 9:49 pm

And here is an animated image of an Android Material progress bar, you want the first one:
https://kstatic.googleusercontent.com/f ... a3a32db938
You can use Richmond's example but make it out of two rounded graphics and keep the height small as per the Material Design specs. Google says 4 pixels high though you may want it a little taller than that, but don't make it too much taller or it won't look like Android.

This page is useful for specifications and usage:
https://material.io/components/progress ... indicators
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Sat Jan 29, 2022 9:44 am

Here's a portable version of the MacOS 12 progress bar for people
who cannot manage to make one themselves:
-
SShot 2022-01-29 at 10.41.48.png
-
This is the sort of exercise I expect the 9-12 year olds who come to my programming classes
every July to manage by the end of week 1 (about 7 hours of instruction).
Attachments
PROGRESS 2.livecode.zip
(1.97 KiB) Downloaded 76 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Sat Jan 29, 2022 9:51 am

Personally this one is my all-time favourites, which
will involve coding that is almost exactly the reverse of my examples
above:
-
AquaStripes.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Sat Jan 29, 2022 10:10 am

SShot 2022-01-29 at 11.09.06.png
Attachments
PROGRESS 3.livecode.zip
(2.9 KiB) Downloaded 86 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: better progress bar

Post by richmond62 » Sat Jan 29, 2022 10:19 am

is there something for android mobile?
-
A 2 minute exercise with a search engine will give you lots:
-
Android1.png
-
Android2.jpeg
-
ALL you now have to do is slice one of those images up into component parts
and use my example stacks to make your own.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”