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
 Kill progress box

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 - 02/12/2004 : 5:10:03 PM
Hi,

Can I kill / destroy / close a progress box?

Cheers,

pete

5   L A T E S T    R E P L I E S    (Newest First)
peter.cook Posted - 02/16/2004 : 06:22:03 AM
Thanks for lesson CP!

Cheers,

Pete

cpyang Posted - 02/13/2004 : 5:25:40 PM
a scope is any section of code enclosed in { },
see below


void test()
{
out_str("before enter scope with progressBox");
// new scope, can also be if(1) { }
{
out_str("progressBox now opens");
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("Current at %d", ii);
aa.SetText(str, PBOXT_TITLE);
}
else
{
out_str("User abort!");
break;
}
LT_execute("sec -p 0.5"); // wasting some time
}
out_str("progressBox will close shortly");
}
out_str("after scope with progressbox");
LT_execute("sec -p 1.5"); // wasting some time

out_str("end program");
}






CP


peter.cook Posted - 02/13/2004 : 4:05:01 PM
Hi Mike, CP,

Thanks for replies. I just had to add a pause as well eg :

LT_execute("break -e; sec -p 0.1")

CP - I'm not sure I understand what you mean though...possibly my problem was one of windows refreshing anyway.

Cheers,

Pete

cpyang Posted - 02/12/2004 : 9:48:43 PM
You just need to structure your code such that the progressBox will go out of scope, then the destructor will close the box.

CP


Mike Buess Posted - 02/12/2004 : 5:53:44 PM
Hi Pete,

LabTalk's 'break -e' closes both LT and OC progress boxes. (I think they're essentially the same thing.)

Mike Buess
Origin WebRing Member

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