Re: [nsbasic-ce] Re: Grid click
You need to look at the parameters of AddObject and how it is called. There are questions of scoping and parent objects. If your app is working, you can ignore these. The IDE only shows a limited list of the properties of ActiveX controls. OK now the event _Click work on two forms, now I will make test on my project. Why this not work when I use the AddObject?? Why I not see the properties from the this object? Thx for you help. EMERSON VIER --- In nsbasic...@yahoogroups.com, George Henne g...@... wrote: Try again, this time creating the form with the Grid on it, not created in your own code with AddObject. This is a Code ShowOKButton True 'Set Close button to OK Sub Form1_Load() AddObject grid,grid,0,10,240,100 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 CommandButton1_Click Form1_Hide Form2_Show End Sub Sub grid_Click MsgBox grid End Sub Sub Form2_Load() AddObject grid,grid1,0,0,240,150 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 '*** Begin Generated Code *** Form1_Show 'Default Form Dim Form1_Temp Sub Form1_Show On Error Resume Next UpdateScreen If IsEmpty(Form1_Temp) Then AddObject Frame, Form1_Form, 0, 0, Output.Width, Output.Height Form1_Form.Visible = False Form1_Form.BackColor = 12632256 AddObject PictureBox, Form1, 0, 0, 0, 0, Form1_Form Form1.BorderStyle = 0 Form1.Move 0, 0, Form1_Form.Width * 15, Form1_Form.Height * 15 Set Form1_Temp = Form1 Form1_Form.Caption = Form1 AddObject CommandButton, CommandButton1, 76, 184, 108, 21, Form1_Form CommandButton1.Caption = Goto Form2 CommandButton1.FontSize = 8.25 CommandButton1.BackColor = 12632256 ' End If On Error Goto 0 Form1_Form.Visible = True callIfExists(Form1_Load) End Sub 'Form1_Show Sub Form1_Hide If IsEmpty(Form1_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form1_Form.Visible = False callIfExists(Form1_Unload) End Sub 'Form1_Hide Dim Form2_Temp Sub Form2_Show On Error Resume Next UpdateScreen If IsEmpty(Form2_Temp) Then AddObject Frame, Form2_Form, 0, 0, Output.Width, Output.Height Form2_Form.Visible = False Form2_Form.BackColor = 12632256 AddObject PictureBox, Form2, 0, 0, 0, 0, Form2_Form Form2.BorderStyle = 0 Form2.Move 0, 0, Form2_Form.Width * 15, Form2_Form.Height * 15 Set Form2_Temp = Form2 Form2_Form.Caption = Form2 End If On Error Goto 0 Form2_Form.Visible = True callIfExists(Form2_Load) End Sub 'Form2_Show Sub Form2_Hide If IsEmpty(Form2_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form2_Form.Visible = False callIfExists(Form2_Unload) End Sub 'Form2_Hide Sub CallIfExists(theSub) Dim s If ScriptEngineMajorVersion 5 Then Execute(On Error Resume Next:theSub) 'attempt to execute it Else On Error Resume Next Set s = GetRef(theSub) If err.Number 0 Then Exit Sub 'it does not exist On Error GoTo 0 Execute (theSub) 'execute it End If End Sub '*** End Generated Code *** --- In nsbasic...@yahoogroups.com, Bob Katayama bkatayama@ wrote: Save the nsb file as a txt file and you can see the generated code once you open the txt file in a text reader. Bob From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On Behalf Of EMERSON VIER Sent: Sunday, July 26, 2009 5:45 PM To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click Sorry but I do not understand your reply EMERSON VIER --- In nsbasic...@yahoogroups.com mailto:nsbasic-ce %40yahoogroups.com , George Henne gh@ wrote: Have a look to how the generated code does this. Create a form with a grid on it, save it as txt file, then open in Notepad. Sent from my iPhone On Jul 19, 2009, at 2:06 PM
Re: [nsbasic-ce] Re: Grid click
Try again, this time creating the form with the Grid on it, not created in your own code with AddObject. This is a Code ShowOKButton True 'Set Close button to OK Sub Form1_Load() AddObject grid,grid,0,10,240,100 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 CommandButton1_Click Form1_Hide Form2_Show End Sub Sub grid_Click MsgBox grid End Sub Sub Form2_Load() AddObject grid,grid1,0,0,240,150 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 '*** Begin Generated Code *** Form1_Show 'Default Form Dim Form1_Temp Sub Form1_Show On Error Resume Next UpdateScreen If IsEmpty(Form1_Temp) Then AddObject Frame, Form1_Form, 0, 0, Output.Width, Output.Height Form1_Form.Visible = False Form1_Form.BackColor = 12632256 AddObject PictureBox, Form1, 0, 0, 0, 0, Form1_Form Form1.BorderStyle = 0 Form1.Move 0, 0, Form1_Form.Width * 15, Form1_Form.Height * 15 Set Form1_Temp = Form1 Form1_Form.Caption = Form1 AddObject CommandButton, CommandButton1, 76, 184, 108, 21, Form1_Form CommandButton1.Caption = Goto Form2 CommandButton1.FontSize = 8.25 CommandButton1.BackColor = 12632256 ' End If On Error Goto 0 Form1_Form.Visible = True callIfExists(Form1_Load) End Sub 'Form1_Show Sub Form1_Hide If IsEmpty(Form1_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form1_Form.Visible = False callIfExists(Form1_Unload) End Sub 'Form1_Hide Dim Form2_Temp Sub Form2_Show On Error Resume Next UpdateScreen If IsEmpty(Form2_Temp) Then AddObject Frame, Form2_Form, 0, 0, Output.Width, Output.Height Form2_Form.Visible = False Form2_Form.BackColor = 12632256 AddObject PictureBox, Form2, 0, 0, 0, 0, Form2_Form Form2.BorderStyle = 0 Form2.Move 0, 0, Form2_Form.Width * 15, Form2_Form.Height * 15 Set Form2_Temp = Form2 Form2_Form.Caption = Form2 End If On Error Goto 0 Form2_Form.Visible = True callIfExists(Form2_Load) End Sub 'Form2_Show Sub Form2_Hide If IsEmpty(Form2_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form2_Form.Visible = False callIfExists(Form2_Unload) End Sub 'Form2_Hide Sub CallIfExists(theSub) Dim s If ScriptEngineMajorVersion 5 Then Execute(On Error Resume Next:theSub) 'attempt to execute it Else On Error Resume Next Set s = GetRef(theSub) If err.Number 0 Then Exit Sub 'it does not exist On Error GoTo 0 Execute (theSub) 'execute it End If End Sub '*** End Generated Code *** --- In nsbasic...@yahoogroups.com, Bob Katayama bkatay...@... wrote: Save the nsb file as a txt file and you can see the generated code once you open the txt file in a text reader. Bob From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On Behalf Of EMERSON VIER Sent: Sunday, July 26, 2009 5:45 PM To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click Sorry but I do not understand your reply EMERSON VIER --- In nsbasic...@yahoogroups.com mailto:nsbasic-ce%40yahoogroups.com , George Henne gh@ wrote: Have a look to how the generated code does this. Create a form with a grid on it, save it as txt file, then open in Notepad. Sent from my iPhone On Jul 19, 2009, at 2:06 PM, EMERSON VIER emersonvier@ wrote: The problem, is grid_click only work on default form Emerson Vier From: rmrsoft alan@ Sent: domingo, 19 de julho de 2009 09:58 To: nsbasic...@yahoogroups.com mailto:nsbasic-ce%40yahoogroups.com Subject: [nsbasic-ce] Re: Grid click 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
[nsbasic-ce] Re: Grid click
OK now the event _Click work on two forms, now I will make test on my project. Why this not work when I use the AddObject?? Why I not see the properties from the this object? Thx for you help. EMERSON VIER --- In nsbasic...@yahoogroups.com, George Henne g...@... wrote: Try again, this time creating the form with the Grid on it, not created in your own code with AddObject. This is a Code ShowOKButton True 'Set Close button to OK Sub Form1_Load() AddObject grid,grid,0,10,240,100 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 CommandButton1_Click Form1_Hide Form2_Show End Sub Sub grid_Click MsgBox grid End Sub Sub Form2_Load() AddObject grid,grid1,0,0,240,150 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 '*** Begin Generated Code *** Form1_Show 'Default Form Dim Form1_Temp Sub Form1_Show On Error Resume Next UpdateScreen If IsEmpty(Form1_Temp) Then AddObject Frame, Form1_Form, 0, 0, Output.Width, Output.Height Form1_Form.Visible = False Form1_Form.BackColor = 12632256 AddObject PictureBox, Form1, 0, 0, 0, 0, Form1_Form Form1.BorderStyle = 0 Form1.Move 0, 0, Form1_Form.Width * 15, Form1_Form.Height * 15 Set Form1_Temp = Form1 Form1_Form.Caption = Form1 AddObject CommandButton, CommandButton1, 76, 184, 108, 21, Form1_Form CommandButton1.Caption = Goto Form2 CommandButton1.FontSize = 8.25 CommandButton1.BackColor = 12632256 ' End If On Error Goto 0 Form1_Form.Visible = True callIfExists(Form1_Load) End Sub 'Form1_Show Sub Form1_Hide If IsEmpty(Form1_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form1_Form.Visible = False callIfExists(Form1_Unload) End Sub 'Form1_Hide Dim Form2_Temp Sub Form2_Show On Error Resume Next UpdateScreen If IsEmpty(Form2_Temp) Then AddObject Frame, Form2_Form, 0, 0, Output.Width, Output.Height Form2_Form.Visible = False Form2_Form.BackColor = 12632256 AddObject PictureBox, Form2, 0, 0, 0, 0, Form2_Form Form2.BorderStyle = 0 Form2.Move 0, 0, Form2_Form.Width * 15, Form2_Form.Height * 15 Set Form2_Temp = Form2 Form2_Form.Caption = Form2 End If On Error Goto 0 Form2_Form.Visible = True callIfExists(Form2_Load) End Sub 'Form2_Show Sub Form2_Hide If IsEmpty(Form2_Temp) Then Err.Raise 44000, , Form not loaded Exit Sub End If Form2_Form.Visible = False callIfExists(Form2_Unload) End Sub 'Form2_Hide Sub CallIfExists(theSub) Dim s If ScriptEngineMajorVersion 5 Then Execute(On Error Resume Next:theSub) 'attempt to execute it Else On Error Resume Next Set s = GetRef(theSub) If err.Number 0 Then Exit Sub 'it does not exist On Error GoTo 0 Execute (theSub) 'execute it End If End Sub '*** End Generated Code *** --- In nsbasic...@yahoogroups.com, Bob Katayama bkatayama@ wrote: Save the nsb file as a txt file and you can see the generated code once you open the txt file in a text reader. Bob From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On Behalf Of EMERSON VIER Sent: Sunday, July 26, 2009 5:45 PM To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click Sorry but I do not understand your reply EMERSON VIER --- In nsbasic...@yahoogroups.com mailto:nsbasic-ce%40yahoogroups.com , George Henne gh@ wrote: Have a look to how the generated code does this. Create a form with a grid on it, save it as txt file, then open in Notepad. Sent from my iPhone On Jul 19, 2009, at 2:06 PM, EMERSON VIER emersonvier@ wrote: The problem, is grid_click only work on default form Emerson Vier From: rmrsoft alan@ Sent: domingo, 19 de julho de 2009 09:58 To: nsbasic...@yahoogroups.com
[nsbasic-ce] Re: Grid click
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 -~--~~~~--~~--~--~---
RE: [nsbasic-ce] Re: Grid click
The problem, is grid_click only work on default form Emerson Vier -Original Message- From: rmrsoft a...@rmrsoft.com Sent: domingo, 19 de julho de 2009 09:58 To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click 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 g [The entire original message is not included] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
RE: [nsbasic-ce] Re: Grid click
The problem, is grid_click only work on default form Emerson Vier -Original Message- From: rmrsoft a...@rmrsoft.com Sent: domingo, 19 de julho de 2009 09:58 To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click 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 g [The entire original message is not included] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: [nsbasic-ce] Re: Grid click
Have a look to how the generated code does this. Create a form with a grid on it, save it as txt file, then open in Notepad. Sent from my iPhone On Jul 19, 2009, at 2:06 PM, EMERSON VIER emersonv...@yahoo.com.br wrote: The problem, is grid_click only work on default form Emerson Vier From: rmrsoft a...@rmrsoft.com Sent: domingo, 19 de julho de 2009 09:58 To: nsbasic...@yahoogroups.com Subject: [nsbasic-ce] Re: Grid click 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 Re adMe 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 g [The entire original message is not included] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[nsbasic-ce] Re: Grid click
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 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 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 -~--~~~~--~~--~--~---
[nsbasic-ce] Re: Grid click
George, You have news about this? Regards, Emerson Vier --- In nsbasic...@yahoogroups.com, EMERSON VIER emersonv...@... wrote: 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 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---