2:
|
A subscript was used that is outside of the valid range of array subscripts defined in the DIMENSION statement. This might also be caused by using two subscripts with a one-dimensional array.
The following VFP sample generates the Invalid subscript reference (Error 31)
with thisform.TreeCube1
with .FrontFace.CreateTree
.Columns.Add("Progress").Alignment = 0
with .Items
with .Add("")
.Height = 32
.BackgroundExt(0) = "none[(2,2,100%-4,100%-4)](top[24,text=`10%`],bottom[6,back=RGB(204,204,204)](left[10%,back=RGB(0,120,215)]))"
.BackgroundExtValue(0,4,2) = "25%"
.BackgroundExtValue(0,2,4) = .BackgroundExtValue(0,4,2)
endwith
endwith
endwith
endwith
You can replace calling of the BackgroundExtValue property, using the
Template/TemplateDef properties of the control as in the following VFP
sample:
LOCAL cObject
with thisform.TreeCube1
with .FrontFace.CreateTree
.Columns.Add("Progress").Alignment = 0
with .Items
cObject = .Add("")
with cObject
.Height = 32
.BackgroundExt(0) = "none[(2,2,100%-4,100%-4)](top[24,text=`10%`],bottom[6,back=RGB(204,204,204)](left[10%,back=RGB(0,120,215)]))"
* .BackgroundExtValue(0,4,2) = "25%"
thisform.TreeCube1.TemplateDef = "dim cObject"
thisform.TreeCube1.TemplateDef = cObject
thisform.TreeCube1.Template = "cObject.BackgroundExtValue(0,4,2) = `25%`"
* .BackgroundExtValue(0,2,4) = .BackgroundExtValue(0,4,2)
thisform.TreeCube1.Template = "cObject.BackgroundExtValue(0,2,4) = cObject.BackgroundExtValue(0,4,2)"
endwith
endwith
endwith
endwith
|