if you want to block your UI (because you have a long running background process like HttpRequest or something else) you can use the $.blockUI() - Command (in JavaScript mode).
Here is a sample code how to use it:
- Code: Select all
Enumeration
#Window
#Button
#Timer
EndEnumeration
Procedure BlockUI(Message.s)
! $.blockUI({ message: v_message });
EndProcedure
Procedure UnblockUI()
! $.unblockUI();
EndProcedure
Procedure TimerEvent()
UnblockUI()
RemoveWindowTimer(#Window, #Timer)
EndProcedure
Procedure ButtonEvent()
BlockUI("<h1>Waiting 3 seconds...</h1>")
AddWindowTimer(#Window, #Timer, 3000) ; Wait 3 Seconds...
BindEvent(#PB_Event_Timer, @TimerEvent(), #Window)
EndProcedure
OpenWindow(#Window, 0, 0, 300, 100, "BlockUI example", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
ButtonGadget(#Button, 10, 10, 200, 30, "Block UI for 3 seconds")
BindGadgetEvent(#Button, @ButtonEvent())
You can get further informations here: http://malsup.com/jquery/block/
Greetings ... Peter