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 BenttiniFrank,
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