OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Li Keqing on September 19, 2020, 03:38:34 am

Title: How can I place a progress bar inside a window?
Post by: Li Keqing 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?
Title: Re: How can I place a progress bar inside a window?
Post by: Alex Taylor 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.
Title: Re: How can I place a progress bar inside a window?
Post by: Li Keqing 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.
Title: Re: How can I place a progress bar inside a window?
Post by: Eugene Gorbunoff 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:
(http://os2.guru/projects/neowps/pic/eComStation-eSchemes.png)
Title: Re: How can I place a progress bar inside a window?
Post by: Li Keqing 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:
(http://os2.guru/projects/neowps/pic/eComStation-eSchemes.png)
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.