Hi
I have worked out how to load editfields on window open from post here, the
LR and others. It did bring up a question though.
I first created an EditField1 set to be 20x20 px then set index to 0 and
visible = false.
In event OPEN on form load this code:
dim x, y, xx, yy as integer
dim e(8,8) as EditField
For y = 20 to 180 step 20
For x = 20 to 180 step 20
yy = (y/20)-1
xx = (x/20)-1
e(yy,xx) = new EditField1
e(yy,xx).Left = x
e(yy,xx).Top = y
e(yy,xx).text = str(e(yy,xx).index)
e(yy,xx).Visible = True
Next x
Next y
It works nicely loading a 9x9 array with 1 through 81 in the fields.
I then placed an pushbutton on the window and two edit fields (xfield to read
in column (x), yfield to read in row (y)). I wanted to hit the pushbutton and
get a msgbox to open with the text of the editfield choosen shown.
dim x ,y as integer
x = floor(val(xfield.text))
y = floor(val(yfield.text))
MsgBox "Value of cell: " + "(" + xfield.text + " , " + yfield.text + ") is :
" + e(x,y).text
All good except that the compiler takes exception to my array of editfields
e(x,y)
They/it don't exist.
I even tried editfieldi(x,y). No go.
I suspect the dynamic loading of e is not kept in memory after finish and
this makes me sad.
I was hoping to use the editfields in the grid in real time on run not have
to reload with new data each change. I know how to do this with graphics and
draw etc but I would like to use the edit fields.
Ideas?
Thanks in advance.
Derek
________________________________________________________________
A man's own manner and character is what most becomes him.
- Marcus Cicero.
www.drunkenpoets.com
www.soundtower.com
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small
Business.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>