GIDForums  

Go Back   GIDForums > Computer Programming Forums > Python Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-Mar-2008, 00:00
sarabhjeet sarabhjeet is offline
New Member
 
Join Date: Jan 2008
Posts: 8
sarabhjeet is on a distinguished road
Post

wxtimer: I need to close a dialog after a particular time


Hello all,
Actually i need to close a dialog automatically after 5-6 seconds.
For it what should i do,please help me.I am using wxTimer
Python Code:
self.MB = wx.Dialog(self,-1,"hello",pos=(-1,-1),size=(200,100),style=wx.NO_3D)
self.MB.Show(True)
self.timer = wx.Timer(5,self.Step(self))
self.timer.Start()
 
 
def Step:
if self.timer.IsRunning():
print ""
else:
self.MB.Close(True)
Is this code is not correct or what?
Please help me.
Last edited by admin II : 12-Mar-2008 at 04:23. Reason: Changed [CODE] to [PY]
  #2  
Old 12-Mar-2008, 20:51
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: wxtimer...I need to close a dialog after a particular time...


Are you getting any errors? I don't know this particular library method so I can't say how it should be used, but make sure you watch your indentation.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
  #3  
Old 13-Mar-2008, 00:02
sarabhjeet sarabhjeet is offline
New Member
 
Join Date: Jan 2008
Posts: 8
sarabhjeet is on a distinguished road
Thumbs up

Re: wxtimer...I need to close a dialog after a particular time...


Quote:
Originally Posted by crystalattice
Are you getting any errors? I don't know this particular library method so I can't say how it should be used, but make sure you watch your indentation.
Thanks for the reply but it has been solved...
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
constructors/classes mapes479 C++ Forum 3 19-Nov-2006 17:34
My Dialog close itself mfc MS Visual C++ / MFC Forum 0 14-Sep-2006 15:53
combox close on enter in vc++ dialog neo79 MS Visual C++ / MFC Forum 1 18-Aug-2006 09:06
Help! Some basal questions about MFC xutingnjupt MS Visual C++ / MFC Forum 1 05-Dec-2004 03:38

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:36.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.