473,508 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

updating label using thread

3 New Member
Expand|Select|Wrap|Line Numbers
  1. use Thread;
  2. use warnings;
  3. use Tk;
  4. my $x=10;
  5. my $mw=new MainWindow;
  6. $mw->Label(-text=>"honeywell")->place(-x=>$x,-y=>50);
  7. my $thr = new Thread \&sub1;
  8. sub sub1 { 
  9.   for($i=0;$i<20;$i++){
  10.       $x+=20;
  11.       sleep(2);            
  12.       $mw->update;
  13.     }
  14. }
  15.     MainLoop;                        
  16.  
I am trying to update the label so that the text appears going down.I want to implement it using thread.But the text os not sliding down.Can anyone plz help me?
Mar 12 '12 #1
0 1231

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4892
by: Hal Vaughan | last post by:
First, I am aware of both SwingUtilities.invokeLater(), and of using Thread to create a new thread.  These are part of the problem. I want to have something running in the background, while the...
0
2275
by: Son of beach | last post by:
I am the beginner of XML. Somebody suggests me to use JDOM for read/ write XML file. I success to use JDOM for reading XML, but get difficulty to update a XML file. Do you have any simple...
1
1995
by: P | last post by:
Hello, I am having a difficult time updating a record via a stored procedure using the gridview and sqldatasource. I cannot seem to be able to find a way to set everything up so that I can pass...
2
3924
by: kaczmar2 | last post by:
I have an ASP.NET page written in VB.NET that has a label: <asp:Label runat="server" ID="lblStatus" CssClass="LabelTxt"></asp:Label> In my code behind, I am running some stored procedures and...
3
1463
by: Christian Filzwieser | last post by:
Hy I created a WebControl called StatusBar with a static function public static void SetText(string text) { MyVariable = Text } and on Page Load I set MyVariable to the Label in my WebControl....
1
1951
by: batista | last post by:
Hello all, I have a third praty grid control...named C1grid. Im using it in one of my apps.. Now, I have bind this grid to a custom dataset class named "DataViewEx". The code of the class is...
3
1949
by: sekarm | last post by:
Dear guys, In C# windows application i am using four threads for seperate process. Each thread done seperate job.i want to monitor the thread process in main windows form.so each...
2
1018
by: Bower | last post by:
Hi, Im writing some code and need to update two labels on a form as per 2 labels on a previous form (still open). The code im using is: Private Sub Form_Load() lblFirst.Caption =...
4
7602
by: directory | last post by:
hey guys, I've got a weird one for ya....i have a form which takes user input in the form of textbox's etc. It then grabs some details from a file and updates some of the labels with some info...
4
1876
by: Edwin Velez | last post by:
http://msdn.microsoft.com/en-us/library/806sc8c5.aspx The URL above gives sample code for use within a Console Application. What I would like to do is use this code within a Windows Form. That...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7132
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.