Help : Progress Bar reaches end at 33%

Postby Antonio Linares » Thu Sep 04, 2008 11:15 pm

James,

Thanks for your feedback :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Patrick Mast » Fri Sep 05, 2008 8:48 am

Antonio,

I was thinking.. Maybe we could have the old meter owner drawed so it "looks" like a themed meter?

Off course, downside is when someone uses different themes. And off course Miscrosoft should let us use TProgress properly so we don't NEED to look for workarounds. ;-)

FYI, I tested TProgress with Vista and themes active here.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby anserkk » Fri Sep 05, 2008 11:22 am

James Bott wrote:It looks like the nPercent you are calculating is the percent of the total number of indexes. Also you have defined the range as 0-100. So, try this--take out the first two lines and add the last line.

// oProg:StepIt()
// oProg:nPosition += nPercent
oProg:setPos( nPercent )

Regards,
James


Mr.James's solution solved my problem.

But now another problem. The Dialog does not display the text on the window. ie the Status DBF Name, No of Records. Index Key. But if I put a MsgInfo("Some Text") and pause the execution of the loop, then I can see the Status ie DBF Name, No.of Records, NTX Key

Kindly go through the screen snapshot and code in the beginning of this thread

What could be wrong ?.

Regards

Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby Patrick Mast » Fri Sep 05, 2008 11:29 am

anserkk wrote:But now another problem. The Dialog does not display the text on the window. ie the Status DBF Name, No of Records. Index Key. But if I put a MsgInfo("Some Text") and pause the execution of the loop, then I can see the Status ie DBF Name, No.of Records, NTX Key

Kindly go through the screen snapshot and code in the beginning of this thread

What could be wrong ?.
Try a oOb:Refresh() or a Sysrefresh() in your loop.

Also, don't put your "@04,01 say" code IN your DO WHILE loop. You need to use the SAY's BEFORE your ACTIVATE DIALOG code. Like this:
Code: Select all  Expand view  RUN
DEFINE DIALOG oDlg TITLE "Reindex Data Files" STYLE nStyle SIZE 600,300 PIXEL ;

@01,01 PROGRESS oProg POSITION 0 SIZE 250, 8
@03,01 BUTTON oBtn  PROMPT "Reindex" SIZE 40,12 ACTION  {oProg:SetStep( 1 ) , oProg:SetRange( 1, 100 ), DoIndexing(oDlg,oProg) }   
@03,10 BUTTON oBtn2 PROMPT "Close"    SIZE 40,12 ACTION  { CloseDbf("All"), oDlg:End() }   

      @04,01 SAY oSay1 VAR cSay2 OF oDlg     
      @05,01 SAY oSay2 VAR cSay2 OF oDLg

ACTIVATE DIALOG oDlg CENTERED


Than, in your DO WHIL Eloop, you can set cSay to what you want to show at that time, and do a oSay:Refresh().

Or do a oSay:Settext("This is my text")

As yu can see, several options available ;-)

Patrick[/code]
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby anserkk » Fri Sep 05, 2008 11:52 am

Hi Mr.Patrick,

Try a oOb:Refresh() or a Sysrefresh() in your loop.


When I tried SysRefresh() in my loop the text is getting displayed.

Also, don't put your "@04,01 say" code IN your DO WHILE loop. You need to use the SAY's BEFORE your ACTIVATE DIALOG code.


I'll do as suggested by u.

Regards

Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests