| Subject |
Re: Wait Window Nowait |
| From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
| Date |
Wed, 17 Jun 2020 18:45:02 +0530 |
| Newsgroups |
dbase.getting-started |
| Attachment(s) |
ketan.wfm |
> Perhaps the original post should also be more clear.
>
> This is an xbase program looping through a file and
> the Wait Window Nowait command (in Foxpro) is used to display
> and update the record number so that the user knows
> that something is happening, without having to "press
> any key to continue" for each record.
>
> eg.
> do while not eof()
> wait 'Record Number: ' + ltrim(str(recno())) window nowait
> main stuff...
> skip
> enddo
> clear window
It was probably required to display a text without disturbing the
underlying text.
I still remember using @clear to clear certain portions of the screens
and displaying fresh data. But that was long ago.
I still have a copy of foxpro for dos but I doubt it will run on windows
10 systems.
Progress bar is for this particular purpose only.
It indicates the progress. You just have to update the value it will
keep on filling the bar.
>
> A quick and ready way to get what is needed.
>
> Of course, the Progress Bar will have all this but
> is there something similar in dBase/duFLP?
If you still want the display to be text as a message I have built a
sample form where the text to display the message is made visible and
altered programmatically.
You can have a look.
Messagebox() will probably not help you as it will stop the processing
for some time.
With progressbar or the method used in form there will be no waiting.
Regards
Akshat
Note : The form is for demo only hence very crude
|
** END HEADER -- do not remove this line
//
// Generated on 17-06-2020
//
parameter bModal
local f
f = new ketanForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class ketanForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
height = 20.8182
left = 35.7143
top = 0.0
width = 104.4286
text = ""
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 5.2273
left = 28.0
top = 5.0
width = 41.0
l0 = "<p>This text will always be there and will not be altered. When you click the push button 1 A number will appear on top of this text. </p><p>When you click push button 2 it will be incremented</p><p>When you click push button 3 the text will disappear leav"
l0 += "ing this text as it is.</p>"
text = l0
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 1.0909
left = 16.0
top = 13.0
width = 15.2857
text = "Push button 1"
endwith
this.PUSHBUTTON2 = new PUSHBUTTON(this)
with (this.PUSHBUTTON2)
onClick = class::PUSHBUTTON2_ONCLICK
height = 1.0909
left = 37.0
top = 13.0
width = 15.2857
text = "Push button 2"
endwith
this.PUSHBUTTON3 = new PUSHBUTTON(this)
with (this.PUSHBUTTON3)
onClick = class::PUSHBUTTON3_ONCLICK
height = 1.0909
left = 61.0
top = 13.0
width = 15.2857
text = "Push button 3"
endwith
this.TEXTLABEL1 = new TEXTLABEL(this)
with (this.TEXTLABEL1)
visible = false
height = 1.0
left = 30.0
top = 7.5
width = 33.0
text = "Textlabel1"
endwith
function PUSHBUTTON1_onClick()
form.textlabel1.visible = true
form.click_times = 0
form.textlabel1.text = "You have clicked the middle button "+form.click_times+" times"
return
function PUSHBUTTON2_onClick()
form.click_times+= 1
form.textlabel1.text = "You have clicked the middle button "+form.click_times+" times"
if form.click_times%2 = 1
form.textlabel1.colornormal = "red"
else
form.textlabel1.colornormal = "blue"
endif
return
function PUSHBUTTON3_onClick()
form.textlabel1.visible = false
return
function form_onOpen()
form.click_times = 0
return
endclass
|