Discussion:
ProgressBar - vertical
(too old to reply)
Frank J. Polan
2008-11-21 15:57:34 UTC
Permalink
I'd like to show a vertical progressbar on a form
Anyone know if it's possible

Thanks

Frank Polan
Frank J. Polan
2008-11-21 16:20:32 UTC
Permalink
Never mind. I've decided to use a vertical slider to show progress

Thanks

Frank Polan


On Fri, 21 Nov 2008 10:57:34 -0500, Frank J. Polan
Post by Frank J. Polan
I'd like to show a vertical progressbar on a form
Anyone know if it's possible
Thanks
Frank Polan
Ivan Benttini
2008-11-21 20:04:04 UTC
Permalink
Hi! Frank,
My name is IVAN.
Since I see NO sample on the dBase Help files, and sine I never use the
Slider,
if you don't mine, can I learn from you with a snip of your code that deals
with
the Sliter moving.

I try it below, without knowing what I was doing, and of course it did NOT
work.

this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
onOpen = class::SLIDER1_ONOPEN
height = 1.0
left = 17.0
top = 14.0
width = 8.0
value = 1
rangeMax = 10
rangeMin = 1
vertical = false
enableSelection = false
startSelection = -1
endSelection = -1
endwith


function SLIDER1_onOpen
return

function form_onOpen
n=1
do while n => 300000000
n++
this.sliter1.enableSelection = true
enddo
return
Thanks in advance
Ivan
Post by Frank J. Polan
Never mind. I've decided to use a vertical slider to show progress
Thanks
Frank Polan
On Fri, 21 Nov 2008 10:57:34 -0500, Frank J. Polan
Post by Frank J. Polan
I'd like to show a vertical progressbar on a form
Anyone know if it's possible
Thanks
Frank Polan
Frank J. Polan
2008-11-21 20:53:21 UTC
Permalink
Ivan

Below is the code for the Slider and the part of the function that
moves it. (watch for the line wrap in the function) The codes a little
convoluted because it's in a CC

HTH

Frank Polan
.......................................................................
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 325.0
left = 625.0
top = 110.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 100
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith
..........................................................................
Function snippet
nRows = q.rowset.count()
nProgress = 0
If q.rowset.first()
DO while not q.rowset.endofset
nProgress++
nSliderValue = 100 - (nProgress / nRows * 100)
this.parent.notebook.purgeInventorycontainer.slider1.value
= nSliderValue // <- this line moves the slider
EndDo
Else
bRes = false
EndIF
RETURN bRes // processInventoryTable






On Fri, 21 Nov 2008 15:04:04 -0500, "Ivan Benttini"
Post by Ivan Benttini
Hi! Frank,
My name is IVAN.
Since I see NO sample on the dBase Help files, and sine I never use the
Slider,
if you don't mine, can I learn from you with a snip of your code that deals
with
the Sliter moving.
I try it below, without knowing what I was doing, and of course it did NOT
work.
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
onOpen = class::SLIDER1_ONOPEN
height = 1.0
left = 17.0
top = 14.0
width = 8.0
value = 1
rangeMax = 10
rangeMin = 1
vertical = false
enableSelection = false
startSelection = -1
endSelection = -1
endwith
function SLIDER1_onOpen
return
function form_onOpen
n=1
do while n => 300000000
n++
this.sliter1.enableSelection = true
enddo
return
Thanks in advance
Ivan
Post by Frank J. Polan
Never mind. I've decided to use a vertical slider to show progress
Thanks
Frank Polan
On Fri, 21 Nov 2008 10:57:34 -0500, Frank J. Polan
Post by Frank J. Polan
I'd like to show a vertical progressbar on a form
Anyone know if it's possible
Thanks
Frank Polan
Ivan Benttini
2008-11-22 16:27:18 UTC
Permalink
Hi Frank,
What is [ q ] equal to?
I get an error here : nRows = q.rowset.count()
Ivan
Post by Frank J. Polan
Ivan
Below is the code for the Slider and the part of the function that
moves it. (watch for the line wrap in the function) The codes a little
convoluted because it's in a CC
HTH
Frank Polan
.......................................................................
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 325.0
left = 625.0
top = 110.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 100
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith
..........................................................................
Function snippet
nRows = q.rowset.count()
nProgress = 0
If q.rowset.first()
DO while not q.rowset.endofset
nProgress++
nSliderValue = 100 - (nProgress / nRows * 100)
this.parent.notebook.purgeInventorycontainer.slider1.value =
nSliderValue // <- this line moves the slider
EndDo
Else
bRes = false
EndIF
RETURN bRes // processInventoryTable
On Fri, 21 Nov 2008 15:04:04 -0500, "Ivan Benttini"
Post by Ivan Benttini
Hi! Frank,
My name is IVAN.
Since I see NO sample on the dBase Help files, and sine I never use the
Slider,
if you don't mine, can I learn from you with a snip of your code that deals
with
the Sliter moving.
I try it below, without knowing what I was doing, and of course it did NOT
work.
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
onOpen = class::SLIDER1_ONOPEN
height = 1.0
left = 17.0
top = 14.0
width = 8.0
value = 1
rangeMax = 10
rangeMin = 1
vertical = false
enableSelection = false
startSelection = -1
endSelection = -1
endwith
function SLIDER1_onOpen
return
function form_onOpen
n=1
do while n => 300000000
n++
this.sliter1.enableSelection = true
enddo
return
Thanks in advance
Ivan
Post by Frank J. Polan
Never mind. I've decided to use a vertical slider to show progress
Thanks
Frank Polan
On Fri, 21 Nov 2008 10:57:34 -0500, Frank J. Polan
Post by Frank J. Polan
I'd like to show a vertical progressbar on a form
Anyone know if it's possible
Thanks
Frank Polan
Frank J. Polan
2008-11-22 16:41:40 UTC
Permalink
Ivan

Q is a reference to a rowset. The code was just a snippet from the
actual program. It won't run on your PC

The following code will run. It uses the dBI FISH.DBF and uses a dBASE
alias of DBASESAMPLES1

On Sat, 22 Nov 2008 11:27:18 -0500, "Ivan Benttini"
Post by Ivan Benttini
Hi Frank,
What is [ q ] equal to?
I get an error here : nRows = q.rowset.count()
Ivan
///////////////// progressBarTest.wfm /////////////
** END HEADER -- do not remove this line
//
// Generated on 11/22/2008
//
parameter bModal
local f
f = new progressBarTestForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class progressBarTestForm of FORM
with (this)
metric = 6 // Pixels
height = 352.0
left = 334.0
top = 0.0
width = 481.0
text = ""
endwith

this.DBASESAMPLES1 = new DATABASE()
this.DBASESAMPLES1.parent = this
with (this.DBASESAMPLES1)
left = 406.0
top = 209.0
databaseName = "DBASESAMPLES"
active = true
endwith

this.FISH1 = new QUERY()
this.FISH1.parent = this
with (this.FISH1)
left = 406.0
top = 209.0
database = form.dbasesamples1
sql = "select * from fish.dbf"
active = true
endwith

this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 24.0
left = 84.0
top = 286.0
width = 107.0
text = "Pushbutton1"
endwith

this.PROGRESS1 = new PROGRESS(this)
with (this.PROGRESS1)
height = 33.0
left = 21.0
top = 88.0
width = 224.0
value = 0
rangeMin = 0
rangeMax = 100
endwith

this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 297.0
left = 322.0
top = 22.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 10
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith

this.rowset = this.fish1.rowset

function PUSHBUTTON1_onClick
nProgress = 0
nRows = form.rowset.count()
form.slider1.rangemax := 100
form.slider1.rangemin := 0
form.slider1.value := 0
n = 100
form.rowset.first()
do
nProgress++
form.progress1.value := nProgress / nRows * 100

form.slider1.value := 100 - form.progress1.value
sleep 1
until not form.rowset.next()

return

endclass
Ivan Benttini
2008-11-22 22:51:37 UTC
Permalink
Frank,
Thanks so much, for the sample,
I have just learn some thing new.
Boy, oh! boy, is any thing that dBase can not do?
Have a nice weekend,
Ivan
Post by Frank J. Polan
Ivan
Q is a reference to a rowset. The code was just a snippet from the
actual program. It won't run on your PC
The following code will run. It uses the dBI FISH.DBF and uses a dBASE
alias of DBASESAMPLES1
On Sat, 22 Nov 2008 11:27:18 -0500, "Ivan Benttini"
Post by Ivan Benttini
Hi Frank,
What is [ q ] equal to?
I get an error here : nRows = q.rowset.count()
Ivan
///////////////// progressBarTest.wfm /////////////
** END HEADER -- do not remove this line
//
// Generated on 11/22/2008
//
parameter bModal
local f
f = new progressBarTestForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class progressBarTestForm of FORM
with (this)
metric = 6 // Pixels
height = 352.0
left = 334.0
top = 0.0
width = 481.0
text = ""
endwith
this.DBASESAMPLES1 = new DATABASE()
this.DBASESAMPLES1.parent = this
with (this.DBASESAMPLES1)
left = 406.0
top = 209.0
databaseName = "DBASESAMPLES"
active = true
endwith
this.FISH1 = new QUERY()
this.FISH1.parent = this
with (this.FISH1)
left = 406.0
top = 209.0
database = form.dbasesamples1
sql = "select * from fish.dbf"
active = true
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 24.0
left = 84.0
top = 286.0
width = 107.0
text = "Pushbutton1"
endwith
this.PROGRESS1 = new PROGRESS(this)
with (this.PROGRESS1)
height = 33.0
left = 21.0
top = 88.0
width = 224.0
value = 0
rangeMin = 0
rangeMax = 100
endwith
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 297.0
left = 322.0
top = 22.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 10
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith
this.rowset = this.fish1.rowset
function PUSHBUTTON1_onClick
nProgress = 0
nRows = form.rowset.count()
form.slider1.rangemax := 100
form.slider1.rangemin := 0
form.slider1.value := 0
n = 100
form.rowset.first()
do
nProgress++
form.progress1.value := nProgress / nRows * 100
form.slider1.value := 100 - form.progress1.value
sleep 1
until not form.rowset.next()
return
endclass
Ivan Benttini
2008-11-23 00:03:10 UTC
Permalink
Frank,
When the slider is place on the form horizontaly, is any way
to make it slide from left to right?
I experiment with some changes, but nothing work.
Thanks,
Imar
Post by Ivan Benttini
Frank,
Thanks so much, for the sample,
I have just learn some thing new.
Boy, oh! boy, is any thing that dBase can not do?
Have a nice weekend,
Ivan
Post by Frank J. Polan
Ivan
Q is a reference to a rowset. The code was just a snippet from the
actual program. It won't run on your PC
The following code will run. It uses the dBI FISH.DBF and uses a dBASE
alias of DBASESAMPLES1
On Sat, 22 Nov 2008 11:27:18 -0500, "Ivan Benttini"
Post by Ivan Benttini
Hi Frank,
What is [ q ] equal to?
I get an error here : nRows = q.rowset.count()
Ivan
///////////////// progressBarTest.wfm /////////////
** END HEADER -- do not remove this line
//
// Generated on 11/22/2008
//
parameter bModal
local f
f = new progressBarTestForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class progressBarTestForm of FORM
with (this)
metric = 6 // Pixels
height = 352.0
left = 334.0
top = 0.0
width = 481.0
text = ""
endwith
this.DBASESAMPLES1 = new DATABASE()
this.DBASESAMPLES1.parent = this
with (this.DBASESAMPLES1)
left = 406.0
top = 209.0
databaseName = "DBASESAMPLES"
active = true
endwith
this.FISH1 = new QUERY()
this.FISH1.parent = this
with (this.FISH1)
left = 406.0
top = 209.0
database = form.dbasesamples1
sql = "select * from fish.dbf"
active = true
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 24.0
left = 84.0
top = 286.0
width = 107.0
text = "Pushbutton1"
endwith
this.PROGRESS1 = new PROGRESS(this)
with (this.PROGRESS1)
height = 33.0
left = 21.0
top = 88.0
width = 224.0
value = 0
rangeMin = 0
rangeMax = 100
endwith
this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 297.0
left = 322.0
top = 22.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 10
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith
this.rowset = this.fish1.rowset
function PUSHBUTTON1_onClick
nProgress = 0
nRows = form.rowset.count()
form.slider1.rangemax := 100
form.slider1.rangemin := 0
form.slider1.value := 0
n = 100
form.rowset.first()
do
nProgress++
form.progress1.value := nProgress / nRows * 100
form.slider1.value := 100 - form.progress1.value
sleep 1
until not form.rowset.next()
return
endclass
Frank J. Polan
2008-11-23 01:32:53 UTC
Permalink
Ivan

The following example will move the slider left to right.

But I want to note that how I'm using the slider is not the way it was
intended to be used. It's meant for the user to drag the pointer to
indicate a value to use or some sicilian reason.

I'm using it instead of the progressBar class because I don't have
room on the form for the width of the horizontal progressBar

Frank Polan

On Sat, 22 Nov 2008 19:03:10 -0500, "Ivan Benttini"
Post by Ivan Benttini
Frank,
When the slider is place on the form horizontaly, is any way
to make it slide from left to right?
I experiment with some changes, but nothing work.
Thanks,
Imar
/////////// progressBarTest.wfm /////////////
** END HEADER -- do not remove this line
//
// Generated on 11/22/2008
//
parameter bModal
local f
f = new progressBarTestForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class progressBarTestForm of FORM
with (this)
metric = 6 // Pixels
height = 352.0
left = 334.0
top = 0.0
width = 481.0
text = ""
endwith

this.DBASESAMPLES1 = new DATABASE()
this.DBASESAMPLES1.parent = this
with (this.DBASESAMPLES1)
left = 406.0
top = 209.0
databaseName = "DBASESAMPLES"
active = true
endwith

this.FISH1 = new QUERY()
this.FISH1.parent = this
with (this.FISH1)
left = 406.0
top = 209.0
database = form.dbasesamples1
sql = "select * from fish.dbf"
active = true
endwith

this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 24.0
left = 84.0
top = 286.0
width = 107.0
text = "Pushbutton1"
endwith

this.PROGRESS1 = new PROGRESS(this)
with (this.PROGRESS1)
height = 33.0
left = 21.0
top = 88.0
width = 224.0
value = 0
rangeMin = 0
rangeMax = 100
endwith

this.SLIDER1 = new SLIDER(this)
with (this.SLIDER1)
height = 297.0
left = 322.0
top = 22.0
width = 49.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 100
rangeMin = 1
vertical = true
enableSelection = false
startSelection = 0
endSelection = -1
endwith

this.SLIDER2 = new SLIDER(this)
with (this.SLIDER2)
height = 44.0
left = 28.0
top = 209.0
width = 266.0
colorNormal = "0x80ff80"
borderStyle = 6 // Drop Shadow
value = 1
rangeMax = 100
rangeMin = 1
vertical = false
enableSelection = false
startSelection = 0
endSelection = -1
endwith

this.rowset = this.fish1.rowset

function PUSHBUTTON1_onClick
nProgress = 0
nRows = form.rowset.count()
form.slider1.rangemax := 100
form.slider1.rangemin := 0
form.slider1.value := 0
form.slider2.rangemax := 100
form.slider2.rangemin := 0
form.slider2.value := 0
form.rowset.first()
do
nProgress++
form.progress1.value := nProgress / nRows * 100

form.slider1.value := 100 - form.progress1.value
form.slider2.value := form.progress1.value
sleep 1
until not form.rowset.next()

return

endclass

Frank J. Polan
2008-11-23 01:16:10 UTC
Permalink
Ivan

You're welcome. Glad I could help

Frank Polan


On Sat, 22 Nov 2008 17:51:37 -0500, "Ivan Benttini"
Post by Ivan Benttini
Frank,
Thanks so much, for the sample,
I have just learn some thing new.
Boy, oh! boy, is any thing that dBase can not do?
Have a nice weekend,
Ivan
Ivan Benttini
2008-11-23 04:03:23 UTC
Permalink
Thanks again, Frank
You "guys" are the best.
Is no user group on this planet like the dBase users group.
Ivan
Post by Frank J. Polan
Ivan
You're welcome. Glad I could help
Frank Polan
On Sat, 22 Nov 2008 17:51:37 -0500, "Ivan Benttini"
Post by Ivan Benttini
Frank,
Thanks so much, for the sample,
I have just learn some thing new.
Boy, oh! boy, is any thing that dBase can not do?
Have a nice weekend,
Ivan
Loading...