Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MM+ Msgbox() timeout option would be nice
Author | Message | ||||
GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
Howdy Geoff, all, I was trying to implement some type of pop up box with a "Please Wait" message while my code was doing something in the background, and then self clearing when the code called for it to go away, or on a timeout. Msgbox() looked like it would fit the bill, but then I realised that nothing can run in the background because it relies on user input to continue. Nor can it be cancelled by code because of the reason mentioned before. The only work around I could come up with is to GUI Setup a new Page with a Displaybox setup with the message. Works, but of course erases the whole screen before it's called. I like the Msgbox() because it looks like a pop up, displaying over the original screen. Not sure if it's possible or worth it, but could we look at maybe a Popup() command, that is similar to Msgbox() but with no buttons, and can be cleared by a '=0' style of Ctrlval or when a timeout is specified as an option? Cheers, GTG! PS, still waiting for that donate button on your webpage...... ...... Don't worry mate, it'll be GoodToGo! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
A timeout would be good for a number of reasons, but would this do what you want? GUI DISABLE ALL RBOX 250, 175, 100, 50, , RGB(red), RGB(black) TEXT 300, 200, "PLEASE WAIT", CM, 4, 1, RGB(red) ' ' do something (may take a little time) ' RBOX 250, 175, 100, 50, , RGB(black), RGB(black) GUI ENABLE ALL Geoff Geoff Graham - http://geoffg.net |
||||
GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
I reckon it would. That's thinking outside the square, I never considered something like that because I was using GUI pages and of course have it stuck in my head not to mix GUI items and basic graphics items.... Think I might borrow that rocking chair and blanky from the Captain...... Thanks again Geoff. GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
It just occurred to me that GUI DISABLE ALL and GUI ENABLE ALL will affect all controls on all pages, even if they are not showing. So you might have to individually list the controls that are on the currently showing page(s) if you have disabled controls on other pages. This is something that I will fix in the next release. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |