The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 ProgressBox in front

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook Posted - 12/18/2003 : 07:28:03 AM
Hi,

How can I set the progress box to always be in front of other windows etc..irrespective of other processes.

Cheers,

pete

12   L A T E S T    R E P L I E S    (Newest First)
Gary Lane Posted - 02/12/2004 : 1:38:15 PM
Hi Pete,

NLSF.Output(0) suppresses only graph creation by the NLSF. Also, the bug you reported above is fixed in Origin 7.5 SR2. There was a confounding variable which explains why not everyone saw this bug...it turns out that the progressBox only got closed when a new graph was created if the C file containing the function was attached to the Origin project file (.i.e. in the Project folder of Code Builder).

Gary
OriginLab

Edited by - Gary Lane on 02/12/2004 3:36:43 PM
peter.cook Posted - 02/03/2004 : 11:58:00 AM
Hi Gary,

Thanks for reply. The work around (will test) is actually useful in it's own right..I remember asking a few times about suppressing graph creation in the past.. For what version is nlsf.output(0) implemented and does it suppress anything else?

Cheers,

Pete

Gary Lane Posted - 02/03/2004 : 11:35:42 AM
Hi Peter,

Until the bug gets fixed there is a work around I should let you know about. The progressBox bug is caused by the creation of the graph window so if you suppress the graph window creation when using the nlsf object the problem goes away. Try executing nlsf.output(0); in your macro to supress the graph creation...something like...

def fit {
nlsf.begin();
nlsf.output(0);
...
}

Gary
OriginLab

BTW: NLSF.Output(0) is not documented...I will try to get it added.



Edited by - Gary Lane on 02/12/2004 3:35:59 PM
peter.cook Posted - 02/03/2004 : 04:19:16 AM
Hi Gary,

Thanks for reply. Likewise, I hope it gets fixed for SR2 - it would be nice to display a progress box whilst fitting multiple (>100s)datasets - keep the users happy.

Cheers,

Pete

Gary Lane Posted - 02/02/2004 : 3:17:24 PM
Hi Peter,

I verified the problem you reported above...looks like the progress box gets closed when a new graph is created while the progress box is open. CP and I consider this a bug and we will try to fix hopefully for SR2.

Gary
OriginLab



Edited by - Gary Lane on 02/12/2004 3:35:25 PM
peter.cook Posted - 12/19/2003 : 07:58:25 AM
Hi CP,

Thanks for reply.

Example code (not complete) is :

void OCGoAheadFit() {

// Missing Code

progressBox LoadFitProgress("Fitting data:");
LoadFitProgress.SetRange(0,dNumComps);

for(NumComp=1;NumComp<=dNumComps;NumComp+=1) {

LoadFitProgress.Set(NumComp-1);
GoAheadFit=1;
wHTDRData.GetCell(DataStart-1,2-1,istring1);

if(GoAheadFit==1) {
// Missing code
LT_execute("create HTDRfitdata0 -c 1;");

Dataset FitDataSetY;
FitDataSetY.Attach("HTDRfitdata0");
// Missing code : adds data to FitDataSetY

LT_execute("HTDR2002fit HTDRfitdata0");
};
};
}

HTDR2002fit HTDRfitdata0 is all LabTalk and does the actual fitting via nlsf.
Graph1 is created as per usual (but not seen here).
In HTDR2002fit various worksheets are made tempoarily active view win -o.

Cheers,

pete

Additional Comment :
if I intersperse code with eg LT_execute("win -h; sec -p 1") then windows jut grayout as opposed to hide...this doesn't seem right?



Edited by - peter.cook on 12/19/2003 09:06:25 AM
cpyang Posted - 12/19/2003 : 05:57:29 AM
SR2 should be sometime in Feb 2004.

As to the problems mentioned, I don't know, as I have not seen such problems. I need to see some code/OPJ that can show problems.

CP


peter.cook Posted - 12/19/2003 : 05:01:52 AM
Hi Hajo,

Thanks for info...yes, your problem was similar / same as mine.


OK CP thanks...any time lines for SR2 or is it way too early to say?

Any thoughts as to why one progress box does not update in one of my apps ... there is a lot of curve fitting going on and maybe it doesn't update?

Also, depending on how my code is organised and in the same app.. I can get the curve fitting to proceed without displaying graphs but again progress box does not update either (per iteration for a number of datasets to be fit)...any advice here? Thanks.

Cheers,

Pete


cpyang Posted - 12/18/2003 : 12:11:33 PM
The following will work in SR2,

 

void dd()
{
int imax = 100;
progressBox aa("This is an example:", PBOX_TOPMOST);
aa.SetRange(0,imax);
string str;
for(int ii = 0; ii < imax; ii++)
{
if(aa.Set(ii))
{
str.Format("Title Text, Current at %d", ii);
aa.SetText(str, PBOXT_TITLE);
aa.SetText("Text at top left corner...", PBOXT_TOPLEFT);
aa.SetText("text at mid center above progress bar", PBOXT_MIDCENTER);
}
else
{
out_str("User abort!");
break;
}
LT_execute("sec -p 0.5"); // wasting some time
}
}



CP


hajo_old Posted - 12/18/2003 : 09:59:13 AM
Some other suggestion regarding progressbox

- adding title label
- adding a second line for setting text during runtime
(setText(string text))


----------------------------
title
----------------------------
line 1: description ... e.g. creating graphics ...
line 2: detail: Graph1, Graph2, Graph3 ...
----------------------------
progressbar 0-100%
----------------------------

So far
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1 is now hajo
cpyang Posted - 12/18/2003 : 08:56:35 AM
Sorry, easy to add, but has to be SR2, tracker now as 5733.

CP


hajo_old Posted - 12/18/2003 : 08:49:45 AM
Hi, Pete

I didn't find anything to do that, but run into a problem initializing progressbox with maximized graphpages..

The only workarround was to hide all pages within the active folder before calling the progressbox ...

Cio
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1 is now hajo

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000