Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 06-30-2016, 09:17 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default Progress

I am trying to achieve to get the Guage progress in Edit1 while Guage is updating so far I tried but not works

Edit.Text:=(IntToStr(Gauge1.Progress));
  #2  
Old 06-30-2016, 10:25 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

And what is not working?
What event did you place this code?
  #3  
Old 06-30-2016, 11:12 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default

This code should work...but as Norrit said how/where are you using it?
__________________
Regards,
Abdulaziz Jasser
  #4  
Old 06-30-2016, 11:13 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default

yes I have place it in gauge onchange event . but actually i want to show this in richedit after few line

richedit .seltext:=('waiting '+ edit.text);

edit text is updated as per gauge moves but in richedit after waiting nothing comes.
  #5  
Old 06-30-2016, 11:15 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

Aaaagh, you post code that is working and ask why it isn't?

Try updating your richedit (repaint or application.Processmessages)
  #6  
Old 06-30-2016, 11:19 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default

i tried but still it does not show in richedit

application.Processmessages;
richedit .seltext:=('waiting '+ edit.text);
  #7  
Old 06-30-2016, 11:53 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

You have a selection in RichEdit?

And uhm, you first set the text and then update it's contents.
Show some more code instead of these snippets that don't explain the problem, place the entire routine.
  #8  
Old 06-30-2016, 12:20 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default

Switch the two lines:


Code:
richedit .seltext:=('waiting '+ edit.text);  //<<== this line first.
application.Processmessages;  <<== this line comes as the second
__________________
Regards,
Abdulaziz Jasser
  #9  
Old 06-30-2016, 12:27 PM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default

I update guage progress with Timer

under button click event
Timer.Enable:=true;
richedit .seltext:=('line1');
richedit .seltext:=('line2');
richedit .seltext:=('waiting '+ edit.text);
application.Processmessages;


and on change event of guage

Edit.Text:=(IntToStr(Gauge1.Progress));
  #10  
Old 06-30-2016, 12:31 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

So you click the button, start a timer (what that does, no idea), and fill the richedit text

So each time you press the button the richedit will update, since that's the only event that triggers it
I would've expected some update code directly after the Edit1.Text setter...
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.