green Progressbar

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

green Progressbar

#1 Post by Auge_Ohr »

hi,

i try c:\exp20\Samples\XbpPack\Progress.prg
i know XbpProgressBar() is from Alaska "Xbase Part Pack #2"

i wonder how you access xbppack2.dll ... i did not know that Way :clap:

but it seems not work ... can't figure out why
1st Pushbutton : no Marquee Effect
2nd Pushbutton : yellow Color ( Pause ) instead of green Color for Progressbar
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: green Progressbar

#2 Post by Auge_Ohr »

ok Found

Code: Select all

METHOD WaitProgress:Interval()
ELSE
   IF nValue > ::progressPause
      ::progressObject:State := XBPPRGR_STATE_PAUSED   // Yellow Color
now also 1st Button Marquee work.

i know Express++ have DCPROGRESS

Code: Select all

DC_XbpProgressBarSuper From XbpStatic
Question : can i overide DC_XbpProgressBar() Method with new for XbpProgressbar() as "Engine" ?

or do i have to build a CH like DcSlider / DcMonth for Expres++ ?
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: green Progressbar

#3 Post by rdonnay »

I wrote DC_XbpProgressBar() long before Alaska gave us XbpProgressBar().

I chose not to replace it in eXpress++ because, back then, eXpress++ was still supporting users of 1.82 and 1.9 (331) and it would not have worked with those releases.

Since then, I found no good reason to change it because many eXpress++ users have added progress bars to their applications.

It appears that you are motivated to want to use a lot of your own and other classes with eXpress++. I might be able to make it a little bit easier for you to do this but you will still need to create your own command .CH file for your own classes. I don't know what I can do, but I'll give it a look.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: green Progressbar

#4 Post by Auge_Ohr »

rdonnay wrote:I wrote DC_XbpProgressBar() long before Alaska gave us XbpProgressBar().
XbpProgressBar() was build by Alaska after include visual Style ... which was introduced with Windows XP Years before ...
rdonnay wrote:I chose not to replace it in eXpress++ because, back then, eXpress++ was still supporting users of 1.82 and 1.9 (331) and it would not have worked with those releases.
as i know ot4xb works since Xbase++ v1.3x
Standard Windows Control "msctls_progress32" work on every Windows OS() since Win95 ( Marquee >= Vista )
rdonnay wrote:Since then, I found no good reason to change it because many eXpress++ users have added progress bars to their applications.
i special talk about "green" Progressbar and Marquee Effect, both are visual Style which modern OS() use.
rdonnay wrote:It appears that you are motivated to want to use a lot of your own and other classes with eXpress++. I might be able to make it a little bit easier for you to do this but you will still need to create your own command .CH file for your own classes. I don't know what I can do, but I'll give it a look.
YES ... special what Xbase++ does not have like Listview !

but that Control is much more complex ... i have to learn first
as Newbie i begin with "small" Sample ... XbpProgressbar() was 1st "native" Control i saw.

DC_XbpProgressBar() only have 2 Method : INIT() and Create()
it use Function DC_GetProgress() to "calc" and paint with GRA.

from DC_GetProgress() i only need last Line (new Position)

Code: Select all

   oProgress:currCount := nCurrCount
i have add to DXE LIB these iVar / Method

Code: Select all

   ASSIGN METHOD DC_SetData() VAR currCount
   ACCESS METHOD DC_GetData() VAR currCount
   ACCESS METHOD DC_GetMaximum() VAR maxCount
   ASSIGN METHOD DC_SetMaximum() VAR maxCount
so it will react on "old" iVar from DC_XbpProgressBar()

i have extract Class DC_XbpProgressBar and make it "dual"

Code: Select all

#IFDEF DXE
   CLASS DC_XbpProgressBar FROM DXE_ProgressBar, DC_XbaseParts
#ELSE
   CLASS DC_XbpProgressBar FROM DC_XbpProgressBarSuper, DC_XbaseParts
#ENDIF
so compile with /DDXE to use DXE Class.

Difference : DXE_Progressbar have "Percent" build-in just need
------------

Code: Select all

   ::percent := ::optionArray[2] // .T.
but i does calculate different in DC_GetProgress()

Code: Select all

   cPercent := Str(100*nPercent,3,0)+"%"
my DXE_Progressbar calculate on 100% and o:Increment (every) is Max/100 so i need a "Scale" ( see Demo )

Code: Select all

   nEvery   := (iMax/100)
   oProgress:nScaleMax := iMax*nEvery
how does it work :
------------------
while Parent of my native Control are FROM XbpStatic all iVAR does exist !

you know from XbpBrowse and o:Colorblock ... visual Style will "cover" it.
so your own Color are not shown ... same now with "green" Progressbar :!:

if you want your own Color you have to disable visual Style when using DXE_Progressbar().
all is still alive but this Way is not tested yet with Express++. ( need Sample ! )

all Code in DC_GetProgress() are execute "as it is" so i hope i break no existing Code.


1.Step :
--------
as Demo i use CONTACT.PRG ( Outlook activeX ... slow )
DCPROGES.PRG contain "dual" CLASS DC_XbpProgressBar using #IFDEF DXE

for 1st (simple) Demo i have work only on 5 iVAR.

Code: Select all

EXPORTED:
#IFDEF DXE
  //
  // redirect to use same iVar from DXE_ProgressBar
  //
#ELSE
  VAR percent                                    // -> DXE
  VAR maxCount                                   // -> DXE
  VAR currCount                                  // -> DXE
  VAR every                                      // -> DXE
  VAR vertical                                   // -> DXE
#ENDIF
for more i need (simple) Express++ Sample to work on.

! Note : "green" Progressbar need Manifest for visual Style.
Attachments
DCPROGES.ZIP
need ot4xb
DLL / LIB v1.9.355
(38.1 KiB) Downloaded 737 times
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: green Progressbar

#5 Post by Auge_Ohr »

hi,

i have made a new Sample from \Samples\Xdemo\Xsample6.prg for Progressbar.

i have run original DcProgress Bar to see what Option are doing ( Express++ Newbie )
Cyan Color of Progressbar, Round Corner, Border (Outline) ... this can't be rework.
only DYNAMIC and Color for Precent is different to DXE_Progressbar() but this is no Problem.

next i compile with /DDXE to activate DXE_Progressbar() without change Source Code.
as i say DC_GetProgress() still does it work (GRA) ... but it is overlay by visual Style ;-)
the Parent ( XbpStatic ) of my Control got all GRA but what you see is the Child.

just have a Idee ... :idea:
i can oChild:hide() than i will see Parent ... all custom GRA should be visible ... hm :think:

YES ... more than easy now :dance:

Code: Select all

     // only hide Child -> see GRA on Parent
     //
     IF nZebra % 2 == 0
        oProgress:HideIt()                          // o:ShowIt()
     ENDIF
as i thought just hide Child and you can see that all GRA work like before, this is what is promise.
so you can switch "on-fly" if you want to have Visual Style or Custom look !

! Note : DCPROGES.PRG will not work in DLL when calling Process is not in same DLL.
in this case you need to link DCPROGES.OBJ into Main EXE to "override" Express++ DLL

p.s. if Roger want to include "native" Progressbar i will share Source of DXE_Progressbar for Express++
Attachments
X6Progress.zip
Express++ Source
need ot4xb
DLL / LIB v1.9.355
(39.97 KiB) Downloaded 713 times
greetings by OHR
Jimmy

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: green Progressbar

#6 Post by skiman »

Hi Jimmy,

Nice work. I will try to implement this in my application. As far as I can see, it should be possible to do this with very little changes.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: green Progressbar

#7 Post by rdonnay »

Jimmy -

This is good what you have done here, but it is not desirable to make changes to eXpress++ classes because I cannot support this.

With some small changes, we should be able to accomplish the same results by using the SUBCLASS clause of @ .. DCPROGRESS.

I will write a sample which uses your DXE_ProgressBar() class as a subclass.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: green Progressbar

#8 Post by Auge_Ohr »

rdonnay wrote:With some small changes, we should be able to accomplish the same results by using the SUBCLASS clause of @ .. DCPROGRESS.

I will write a sample which uses your DXE_ProgressBar() class as a subclass.
i'm still a Newbie in Express++ and did not know about those benefit.
THX for Help you give me to learn Power of Express++
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: green Progressbar

#9 Post by rdonnay »

i'm still a Newbie in Express++ and did not know about those benefit.
THX for Help you give me to learn Power of Express++
I am planning a European eXpress++ devcon in May 2017.
You should join us.

Attached is an updated sample that sub-classes @..DCPROGRESS :
Attachments
xs6.zip
(1.92 KiB) Downloaded 701 times
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: green Progressbar

#10 Post by Auge_Ohr »

rdonnay wrote:I am planning a European eXpress++ devcon in May 2017.
You should join us.
YES. we do have next week our user meeting so i will ask about that.
rdonnay wrote:Attached is an updated sample that sub-classes @..DCPROGRESS :
WOW ... so easy to use

Code: Select all

SUBCLASS 'MyProgressBar()'
greetings by OHR
Jimmy

Post Reply