View to show progress? ProgressBar no .max property?

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

I would like to use the ProgressBar like the SeekBar because the ProgressBar doesn't have a thumb a user can drag back and forth.

The SeekBar has a .max property so I can let the user know when something is finished but I would like to do this with a ProgressBar.

Since the ProgressBar doesn't have a .max property, can you tell me how to implement that type of functionality in my coding?

I could disable a SeekBar but that wouldn't look as nice as a ProgressBar.

Thanks.
 

klaus

Expert
Licensed User
Longtime User
You have two possibilities:
- calculate the max value giving 100 Value / ValueMax * 100
- add the max property with the Reflection library

B4X:
IndexMax = 250
Dim rflBar As Reflector
rflBar.Target = ProgressBar1
rflBar.RunMethod2("setMax", IndexMax, "java.lang.int")
Best regards.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Thanks ever so much for your help. :D

You have two possibilities:
- calculate the max value giving 100 Value / ValueMax * 100
- add the max property with the Reflection library

B4X:
IndexMax = 250
Dim rflBar As Reflector
rflBar.Target = ProgressBar1
rflBar.RunMethod2("setMax", IndexMax, "java.lang.int")
Best regards.
 
Upvote 0
Top