Posted on 2003-03-25
I am programming in DBASE 2000. It is a mixture of DBASE and Delphi. Since they don't have a DBASE 2000 or DB2K topic I will submit my question here.
I have a form that has a notebook with tabs.... My program goes to a certain directory reads all .DBF files into an array then creates a notebook1 object using the file names as tab names. After I get the size of the array or how many elements are in it. I use the element count to figure out how many grid objects I will need. I want to have a grid per-tab. This is so the user can click on the notebook tab that he wants and view the .DBF file in the grid.
My problem is this. I don't want to go and create a set number of grids. I want to be able to create how many I need acording to how many elements are in the .DBF array. I need to know if there is a way to do this. This what I tried but DBASE 2000 gets confused.
For i = 1 to FileArray.Size
MyGridName := "Grid" + i
MyGridName = New Grid(form.notebook1)
I was hoping this would loop through this and names each grid. I.E. Grid1, Grid2, Grid3, Grid4,..etc
Then I could go and run another loop and assign value to each grid properties.....
For i = 1 to FileArray.size
With (Form.Notebook1.Grid + i)
left := 1.00
pageno := 2
Please help. I need to make this work.