I use the "AddObject"
Sub Form1_Load()
On Error resume next
AddObject "grid","grid",0,0,240,150
If err Then
MsgBox "Grid control not installed. Please check the ReadMe file's section
on ""Install Device Components"" for more information.",,"Grid"
Bye
End If
On Error Goto 0
grid.cols=3
grid.rows=4
grid.TextMatrix(0, 0) = "Kenny"
grid.TextMatrix(1, 0) = "Carmen"
grid.TextMatrix(2, 0) = "Kyle"
grid.TextMatrix(3, 0) = "Eric"
grid.TextMatrix(0, 1) = "Grossman"
grid.TextMatrix(1, 1) = "Crabtree"
grid.TextMatrix(2, 1) = "Garrison"
grid.TextMatrix(3, 1) = "Cartman"
grid.TextMatrix(0, 2) = "Denver"
grid.TextMatrix(1, 2) = "Boulder"
grid.TextMatrix(2, 2) = "South Park"
grid.TextMatrix(3, 2) = "Lakeview"
End Sub
Sub grid_Click
MsgBox "grid"
End Sub
Sub Form2_Load()
On Error resume next
AddObject "grid","grid1",0,0,240,150
If err Then
MsgBox "Grid control not installed. Please check the ReadMe file's
section on ""Install Device Components"" for more information.",,"Grid"
Bye
End If
On Error Goto 0
grid1.cols=3
grid1.rows=4
grid1.TextMatrix(0, 0) = "1Kenny"
grid1.TextMatrix(1, 0) = "1Carmen"
grid1.TextMatrix(2, 0) = "1Kyle"
grid1.TextMatrix(3, 0) = "1Eric"
grid1.TextMatrix(0, 1) = "1Grossman"
grid1.TextMatrix(1, 1) = "1Crabtree"
grid1.TextMatrix(2, 1) = "1Garrison"
grid1.TextMatrix(3, 1) = "1Cartman"
grid1.TextMatrix(0, 2) = "1Denver"
grid1.TextMatrix(1, 2) = "1Boulder"
grid1.TextMatrix(2, 2) = "1South Park"
grid1.TextMatrix(3, 2) = "1Lakeview"
End Sub
Sub grid1_Click
MsgBox "grid1"
End Sub
Sub CommandButton1_Click
Form1.Hide
Form2_Show
End Sub
--- In [email protected], "George Henne" <g...@...> wrote:
>
> How are you creating the grid? Are you using AddObject in your code, or
> is it being created as part of your form?
>
> >I try again and events "click" only work on Default Form, if I try this
> >on other Form not work, I not get any error messages
> >
> >EMERSON VIER
> >
> >--- In [email protected], "George Henne" <gh@> wrote:
> >>
> >> There is not enough info here to give much help.
> >>
> >> Have you added a grid object named "grid" to your project?
> >>
> >> Do you get any error messages?
> >>
> >> >I use the sample grid.nsb and includ the code
> >> >
> >> >Sub grid_Click
> >> >
> >> > Dim Linha
> >> > Dim Coluna
> >> > Coluna = grid.col
> >> > Linha = grid.row
> >> > MsgBox Grid.TextMatrix(Linha,Coluna)
> >> >
> >> >End Sub
> >> >
> >> >This work very well.
> >> >
> >> >I include this code in other project, this not work, not any
> >information;...
> >> >
> >> >EMERSON VIER
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >------------------------------------
> >> >
> >> >Yahoo! Groups Links
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nsb-ce" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---