Page 1 of 2
Wait window is visible not enough
Posted: Wed Apr 21, 2010 10:39 am
by mol
There is no possibility to determine look of WAIT WINDOW. But often, this window is visible not enough.
It would be great to have control about background color, font color, maybe font size.
regards, Marek
Re: Wait window is visible not enough
Posted: Wed Apr 21, 2010 1:34 pm
by Rathinagiri
I was about to ask. I think Roberto is busy on other preferential work.
Re: Wait window is visible not enough
Posted: Wed Apr 21, 2010 2:17 pm
by Roberto Lopez
mol wrote:There is no possibility to determine look of WAIT WINDOW. But often, this window is visible not enough.
It would be great to have control about background color, font color, maybe font size.
regards, Marek
I'll think about that...
I'm busy working in other of your wishes right now
Re: Wait window is visible not enough
Posted: Sat Jul 02, 2011 6:32 pm
by gert_w
My Wait Window
I am wondering why nobody had the idea yet to define a window as TOPMOST and activate it by 'Show' and 'Hide'. This works fine for me and you can define the layout, text and colors as you need.
For some "waiting" operations you can also include a progress bar.
Gert
Code: Select all
#include "hmg.ch"
#define C_LIGHTBLUE {165,175,245}
Function Main
DEFINE WINDOW Win_1 ;
AT 0,0 WIDTH 400 HEIGHT 400 ;
TITLE "Gert's WAIT WINDOW DEMO" ;
MAIN
@ 70,70 BUTTON Button_1 CAPTION 'WAIT WINDOW "Processing..." NOWAIT' ACTION Test1() WIDTH 250
@ 100,70 BUTTON Button_2 CAPTION 'WAIT CLEAR' ACTION Test2() WIDTH 250
END WINDOW
DEFINE WINDOW Win_Wait ;
AT 0,0 WIDTH 225 HEIGHT 80 ;
TOPMOST NOSHOW NOSIZE NOCAPTION NOAUTORELEASE BACKCOLOR C_LIGHTBLUE
@ 20,30 LABEL L1 VALUE 'please wait...' WIDTH 180 HEIGHT 40;
FONT 'ARIAL' SIZE 20 FONTCOLOR BLUE BOLD BACKCOLOR C_LIGHTBLUE
END WINDOW
CENTER WINDOW Win_1
CENTER WINDOW Win_Wait
ACTIVATE WINDOW Win_1
ACTIVATE WINDOW Win_Wait
Return
procedure test1()
Win_Wait.show
return
procedure test2()
Win_Wait.hide
return
Re: Wait window is visible not enough
Posted: Sun Jul 03, 2011 7:21 am
by Rathinagiri
Nice one. It is very much useful. Thanks a lot Gert.
Wait window is visible not enough
Posted: Thu Dec 11, 2014 1:54 pm
by Pablo César
Hi All !
I prepared an improved version of our colleague Gert:
Code: Select all
#include <hmg.ch>
#define C_LIGHTBLUE {165,175,245}
Function Main()
Set Century On
DEFINE WINDOW Win_1 ;
AT 0,0 WIDTH 600 HEIGHT 450 BACKCOLOR BLUE ;
TITLE "WAIT WINDOW DEMO" MAIN
ON KEY ESCAPE ACTION ThisWindow.Release
@ 030,160 BUTTON Button_1 CAPTION 'WAIT/CLEAR WINDOW "Auto-Release" NOWAIT' ACTION Test1() WIDTH 290
@ 070,160 BUTTON Button_2 CAPTION 'WAIT WINDOW "Start Processing" NOWAIT' ACTION Test2() WIDTH 290
@ 100,160 BUTTON Button_3 CAPTION 'WAIT CLEAR "Stop Processing" ' ACTION Test3() WIDTH 290
DEFINE STATUSBAR FONT "Courier New" SIZE 9
DATE WIDTH 85
STATUSITEM HMG_PadC("Press [Esc] to exit",64) ACTION ThisWindow.Release RAISED WIDTH 450
CLOCK WIDTH 65
END STATUSBAR
END WINDOW
DEFINE WINDOW Win_Wait AT 0,0 WIDTH 400 HEIGHT 64 ;
TOPMOST NOSHOW NOCAPTION NOSYSMENU NOAUTORELEASE BACKCOLOR C_LIGHTBLUE
@ 20,10 LABEL L1 VALUE 'Please wait...' WIDTH 380 HEIGHT 20 CENTERALIGN ;
FONT 'ARIAL' SIZE 14 FONTCOLOR BLUE BOLD BACKCOLOR C_LIGHTBLUE
END WINDOW
CENTER WINDOW Win_1
CENTER WINDOW Win_Wait
ACTIVATE WINDOW Win_1, Win_Wait
Return Nil
Function Test1()
Local i
Win_1.Button_2.Enabled := .F.
Win_1.Button_3.Enabled := .F.
Win_Wait.show
For i=1 To 10
Win_Wait.L1.VALUE := 'Please wait '+Alltrim(Str(i))+" second"+If(i=1,"","s")
hb_IdleSleep( 0.5 )
Next
Win_Wait.hide
Win_1.Button_2.Enabled := .T.
Win_1.Button_3.Enabled := .T.
Return Nil
Function Test2()
Win_1.Button_1.Enabled := .F.
Win_Wait.show
Win_Wait.L1.VALUE := 'Please wait...'
Return Nil
Function Test3()
Win_1.Button_1.Enabled := .T.
Win_Wait.hide
Return Nil
- Screen1.png (19.68 KiB) Viewed 4693 times
I hope you enjoy it and be usefull too
Re: Wait window is visible not enough
Posted: Thu Dec 11, 2014 5:35 pm
by serge_girard
Yes, it is!
Thanks, Serge
Re: Wait window is visible not enough
Posted: Thu Dec 11, 2014 6:34 pm
by Javier Tovar
Gracias Pablo César por compartir!
Saludos
Re: Wait window is visible not enough
Posted: Fri Dec 12, 2014 9:07 am
by vagblad
Thanks Gert and Pablo!
Re: Wait window is visible not enough
Posted: Fri Dec 12, 2014 11:32 am
by quartz565
Thank you Gert and Pablo!