× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

How can I write Progress Bar on unix screen.

  • cemtezer
  • cemtezer's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
12 years 4 months ago #13633 by cemtezer
Hi, my friends.
I want to learn how can i write a progress bar in jbasic.
for example our process number: 170
this bar is displayed on prompt screen.
already Thanks for helps.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
12 years 4 months ago #13638 by jpb
set ANZ.UP to your number of tasks, e.g. 170

do GOSUB GRAPH after each step


GRAPH:
******
*
* Graph of % completion of a task
*
    CNTR += 1
    NEW.PCT = INT( CNTR * 100 / ANZ.UP)
    IF NEW.PCT NE OLD.PCT THEN
        percent = NEW.PCT
        caption = 'This is the bottom-line of your progress bar - add some text'
    END
    OLD.PCT = NEW.PCT
    PRINT @(1,14):'          |---|---|---|---|---|---|---|---|---|---| ':@(-4)
    PRINT @(1,15):'          0       20      40      60      80     100':@(-4)
    PRINT @(1,16):'          ':caption:@(-4)
    bar.length = INT( percent * 40 / 100)
    bar = STR(' ',bar.length)
    PRINT @(1,13):"           ":@(-13):bar:@(-14):percent:' %':@(-4)

    RETURN
The following user(s) said Thank You: cemtezer, prashen001

Please Log in or Create an account to join the conversation.

  • cemtezer
  • cemtezer's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
12 years 4 months ago #13642 by cemtezer
Replied by cemtezer on topic How can I write Progress Bar on unix screen.
thank you too much to share ur source.
Regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.036 seconds