Is it possible to make a wxPython application intentionally wait 5 seconds on loading some data even if the process of loading is not taking so long? Like pausing the application somehow? I want that the application shows the busy cursor by using wx.BeginBusyCursor() and then loads the data, waits 5 seconds (including the loading process time), stops the busy cursor, and makes the application clickable again. I want that the application is given like 5 seconds max. time to load the data, but have it wait to the 5th second even if it finishes loading sooner. Is that possible? Is there any Lock method or something? Like in Pygame, there is a Surface.lock() function which locks the Surface memory for pixel access. Is there anything similar in wxPython?
Try the wx.SplashScreen or wx.BusyInfo widgets.
···
On Dec 8, 6:08 pm, Boštjan Mejak <bostjan.me...@gmail.com> wrote:
Is it possible to make a wxPython application intentionally wait 5 seconds
on loading some data even if the process of loading is not taking so long?
Like pausing the application somehow? I want that the application shows the
busy cursor by using wx.BeginBusyCursor() and then loads the data, waits 5
seconds (including the loading process time), stops the busy cursor, and
makes the application clickable again. I want that the application is given
like 5 seconds max. time to load the data, but have it wait to the 5th
second even if it finishes loading sooner. Is that possible? Is there any
Lock method or something? Like in Pygame, there is a Surface.lock() function
which locks the Surface memory for pixel access. Is there anything similar
in wxPython?
-------------------
Mike Driscoll
wx.BusyInfo is what I was looking for. Thanks, Mike. I have another one for you. In the wiki I found out that wx.BusyInfo does not block events. Is there anything in wxPython that blocks all events?
Disable()
···
On 12/9/10 7:11 AM, Bo�tjan Mejak wrote:
wx.BusyInfo is what I was looking for. Thanks, Mike. I have another one
for you. In the wiki I found out that wx.BusyInfo does not block events.
Is there anything in wxPython that blocks all events?
--
Robin Dunn
Software Craftsman
I have an application which loads some data and I want to block events for fixed 5 seconds while the data is loading. I also want to show the busy cursor while the data is loading. How am I about to do just that?
frame.Disable, wx.BusyCursor and maybe wx.Timer.
···
On 12/9/10 11:21 AM, Bo�tjan Mejak wrote:
I have an application which loads some data and I want to block events
for fixed 5 seconds while the data is loading. I also want to show the
busy cursor while the data is loading. How am I about to do just that?
--
Robin Dunn
Software Craftsman
wx.Frame.Disable()? What does this do? Greyes-out the frame?
A little time-saving tip for you: sometimes just trying a suggestion takes less time and keystrokes than Googling, actually reading the API, or emailing a follow-up question.
···
On Fri, Dec 10, 2010 at 5:49 AM, Boštjan Mejak bostjan.mejak@gmail.com wrote:
wx.Frame.Disable()? What does this do? Greyes-out the frame?
Strangely it disables the frame (and all it's children.) I never would have guessed that from reading the name of the method or from all the other messages of the past couple days talking about Disable(). Since you want to disable processing of events then using Disable seems an appropriate way to do it. Whether the platform will use colors to indicate to the user the the window is disabled or not is an implementation detail.
···
On 12/10/10 2:49 AM, Bo�tjan Mejak wrote:
wx.Frame.Disable()? What does this do? Greyes-out the frame?
--
Robin Dunn
Software Craftsman
Who would have guessed?
···
On Fri, Dec 10, 2010 at 1:01 PM, Robin Dunn robin@alldunn.com wrote:
On 12/10/10 2:49 AM, Boštjan Mejak wrote:
wx.Frame.Disable()? What does this do? Greyes-out the frame?
Strangely it disables the frame (and all it’s children.) I never would have guessed that from reading the name of the method or from all the other messages of the past couple days talking about Disable(). Since you want to disable processing of events then using Disable seems an appropriate way to do it. Whether the platform will use colors to indicate to the user the the window is disabled or not is an implementation detail.
–
Robin Dunn
Software Craftsman
–
Mike Driscoll