IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Wicked...   Print This     
  From the June 2011 Issue of Prestwood eMag
 
Paradox OPAL: Wicked Coding Tasks:
Implementing a Reusable Progress Bar in Paradox
 
Posted 21 years ago on 4/25/2003 and updated 6/12/2008
Take Away: This overview helps you create and use a reusable progress bar.

KB100239

The following overview helps you create and use a reusable progress bar. Click Here to download the progress.fsl form. Copy and paste the custom methods to a form or library.

Design Objects

Create the following forms:

View Data Mode:

 

cmOpenProgressBar

Follow the comments:
{----------------------------------------------
Title: desktop::#Library1::cmProgressBar*
By: Mike Prestwood
Date: 4:49:01 PM, 2/20/96
Company Name: Prestwood Software & Consulting
Notes: Also see cmSetProgressBar() & cmCloseProgessBar().
-----------------------------------------------}

method cmOpenProgressBar(sTitle String) Logical
   if sTitle.isBlank() then
                sTitle = "Please wait..."
   endIf

   if fProgress.attach(sTitle) then
                return(True)
   else
    if fProgress.open(cmFindCommon() + "\\Progress", 
       WinStyleDefault + WinStyleHidden) then
      fProgress.setTitle(sTitle)
      oleProgress.attach(fProgress.oleProgressBar)
      sleep()
      fProgress.bringToTop()
      return(True)
    else
      return(False)
    endIf
  endIf
endMethod
cmSetProgressBar
{-----------------------------------------------
Title: Shared\desktop::#Library1::cmSetProgressBar*
Date: 3:16:29 PM, 2/23/96
Description: Pass siPercent 0 if you wish to keep the 
current setting. 
-----------------------------------------------}

method cmSetProgressBar(sText String, 
  siPercent SmallInt) Logical

if not fProgress.isAssigned() then
   if not cmOpenProgressBar("") then
      return(False)
   endIf
endIf

switch
  case siPercent < 1
    : smallInt(siPercent = oleProgress.Pos)
  case siPercent > 100
    : siPercent = 95
      fProgress.txtLine2.text = "Almost finished..."
endSwitch

fProgress.txtLine1.text = sText
oleProgress.Pos = siPercent
return(True)
endMethod

cmGetProgressBar
{-------------------------------------------
Title: Shared\desktop::#Library1::cmGetProgressBar*
Date: 3:22:38 PM, 2/23/96
Description: Returns 0 if not open.
-------------------------------------------}

method cmGetProgressBar() SmallInt
  if not fProgress.isAssigned() then
     return(0)
  endIf

  return(SmallInt(oleProgress.Pos))
endMethod

cmIsOpenProgressBar

method cmIsOpenProgressBar() Logical
   return(fProgress.isAssigned())
endMethod
cmCloseProgressBar
method cmCloseProgressBar() Logical
  if fProgress.isAssigned() then
     sleep(kSleep)
     fProgress.close()
     return(True)
  else
     return(False)
  endIf

endMethod

Using the progress bar
Uses ObjectPAL
 "common.lsl"
endUses

method pushButton(var eventInfo Event)
  var
    libCommon  Library
    siCounter  SmallInt
  endVar

  libCommon.open("common")
  libCommon.cmOpenProgressBar("Processing...")
  for siCounter from 1 to 20
   libCommon.cmSetProgressBar(String(siCounter)
   +" of 20",sicounter*5)
   sleep(250)
  endFor

  libCommon.cmCloseProgressBar()
endMethod

 

 

Linked Message Board Threads

 Implementing a Reusable Progress Bar in Paradox in Paradox Forms MB Topic (8 replies)

Comments

1 Comments.
Share a thought or comment...
Comment 1 of 3

 Hey.. what happened to this page.. no longer available.. can you get it to work again?

Posted 59 months ago

Comment 2 of 3

Thnaks for your service i really appreciate this because you are taking time to help others. Here is such an amazing Text Me When You Get Home Hoodie available in special iscount juts go an check this out.

Posted 44 months ago

Comment 3 of 3

great store

Mirillis Action Serial Key

Posted 40 months ago
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1116A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #100239 Counter
9015
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]