Author Topic: How can I place a progress bar inside a window?  (Read 516 times)

Li Keqing

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 7
  • Karma: +0/-0
  • Transgender & transmedicalist.
    • View Profile
How can I place a progress bar inside a window?
« on: September 19, 2020, 03:38:34 am »
Hi folks!
It seems that OS/2 does not provide such a control natively. I can emulate a progress bar using STATIC, but I have to write tons line of code to make it usable.
Do you have any better idea about it?

Alex Taylor

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 19
  • Posts: 287
  • Karma: +0/-0
    • View Profile
Re: How can I place a progress bar inside a window?
« Reply #1 on: September 19, 2020, 05:50:58 am »
The PM slider control has a 'ribbon' mode which allows it to be used as a (crude) progress bar. 

Otherwise there is no built-in "pure" PM progress bar control, but various different GUI toolkits provide their own.

XWPHelpers is an open source example. It provides lots of additional controls like progress bar, tooltips, etc.  However you generally have to compile the library yourself which can be a bit complicated to set up (and IIRC you need the IBM compiler for that).
http://trac.netlabs.org/xwphelpers/browser/branches/branch-1-0

The AFCUTIL library originally written for Styler/2 has various controls too, including a 'progress dialog'. This is also open source but unfortunately not really documented (and the source comments are mostly in Italian...)
https://github.com/OS2World/UTIL-WPS-Styler_2/tree/master/utildll

There used to be commercial libraries that had controls like this. I presume IBM's OpenClass library had one. There were others too.

Li Keqing

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 7
  • Karma: +0/-0
  • Transgender & transmedicalist.
    • View Profile
Re: How can I place a progress bar inside a window?
« Reply #2 on: September 19, 2020, 06:40:10 am »
The PM slider control has a 'ribbon' mode which allows it to be used as a (crude) progress bar. 

Otherwise there is no built-in "pure" PM progress bar control, but various different GUI toolkits provide their own.

XWPHelpers is an open source example. It provides lots of additional controls like progress bar, tooltips, etc.  However you generally have to compile the library yourself which can be a bit complicated to set up (and IIRC you need the IBM compiler for that).
http://trac.netlabs.org/xwphelpers/browser/branches/branch-1-0

The AFCUTIL library originally written for Styler/2 has various controls too, including a 'progress dialog'. This is also open source but unfortunately not really documented (and the source comments are mostly in Italian...)
https://github.com/OS2World/UTIL-WPS-Styler_2/tree/master/utildll

There used to be commercial libraries that had controls like this. I presume IBM's OpenClass library had one. There were others too.
Thanks for you detailed reply! 'Ribbon' mode slider may be okay, I will have a try.

Eugene Gorbunoff

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 127
  • Karma: +0/-0
    • View Profile
Re: How can I place a progress bar inside a window?
« Reply #3 on: September 21, 2020, 01:51:45 am »
eToolkit allows show progress-bar,
progres..dll
http://os2.guru/projects/developer/toolkit/?action=toolkit
ArcaOS, eComStation 2.0 include the runtime so it will work on any  OS/2 computer running tpday.

example, circular:

Li Keqing

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 7
  • Karma: +0/-0
  • Transgender & transmedicalist.
    • View Profile
Re: How can I place a progress bar inside a window?
« Reply #4 on: September 21, 2020, 08:16:52 am »
eToolkit allows show progress-bar,
progres..dll
http://os2.guru/projects/developer/toolkit/?action=toolkit
ArcaOS, eComStation 2.0 include the runtime so it will work on any  OS/2 computer running tpday.

example, circular:

Thanks for your reply! But I'd like to make the app runs on OS/2 2.0, so it may not be an acceptable choice.