I don't have much experience of multiple forms, but if you want multiple grids 
I find it easier to put them both on the same Form and then use the MOVE 
command to decide which one is 'live' 

So you get:

AddObject "grid","grid",9000,0,240,150
AddObject "grid","grid1",9000,0,240,150

Then to use the first Grid use

grid1.Move 9000
grid.move 0

And to switch to the second grid

grid.Move 9000
grid1.move 0
 
Cheers

Al


--- In nsbasic...@yahoogroups.com, "EMERSON VIER" <emersonv...@...> wrote:
>
> 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 nsbasic...@yahoogroups.com, "George Henne" <gh@> 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 nsbasic...@yahoogroups.com, "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 nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to