Jun 28, 2012 Replies: 5 Hello, I have received tons of help from people on this forum. Here is something I put together – I hope others find it useful in some way. This is a class that implements a Grid. I implemented the grid by overlaying labels on a panel. Each label represents a cell giving each cell a click event. I also passed parameters to the grid.initialize using a parameter map. The grid is implemented as a B4A class. Source code and a test project are included in the zip. Barry. Attachments GridClass.zip GridClass.zip 7.3 KB · Views: 835 SSVibrant.png 24.5 KB · Views: 1,335 Click to expand...
Hello, I have received tons of help from people on this forum. Here is something I put together – I hope others find it useful in some way. This is a class that implements a Grid. I implemented the grid by overlaying labels on a panel. Each label represents a cell giving each cell a click event. I also passed parameters to the grid.initialize using a parameter map. The grid is implemented as a B4A class. Source code and a test project are included in the zip. Barry.
sanjibnanda Active Member Licensed User Longtime User Oct 29, 2012 #2 CR grid cell color Hi, i am using your grid project, how can i change the color of cell on some click event. regards, sanjib
CR grid cell color Hi, i am using your grid project, how can i change the color of cell on some click event. regards, sanjib
M Mahares Expert Licensed User Longtime User Oct 29, 2012 #3 In the CRGrid class module, I added a line in the cell _click sub. See below: Code: Sub cell_click Dim i, r, c As Int Dim s As String Dim lb As Label lb = Sender lb.Color=Colors.Red :lb.TextColor=Colors.white :lb.Text="TEST" CallSub2(Main, clicksub, lb) End Sub
In the CRGrid class module, I added a line in the cell _click sub. See below: Code: Sub cell_click Dim i, r, c As Int Dim s As String Dim lb As Label lb = Sender lb.Color=Colors.Red :lb.TextColor=Colors.white :lb.Text="TEST" CallSub2(Main, clicksub, lb) End Sub
C COBRASoft Active Member Licensed User Longtime User Oct 30, 2012 #4 Without checking your code or class, I once made a grid using a module, perhaps there are some things in there you can use in yours. The code is available on this forum and is free
Without checking your code or class, I once made a grid using a module, perhaps there are some things in there you can use in yours. The code is available on this forum and is free
sanjibnanda Active Member Licensed User Longtime User Oct 30, 2012 #5 CR grid cell color Mahares said: In the CRGrid class module, I added a line in the cell _click sub. See below: Code: Sub cell_click Dim i, r, c As Int Dim s As String Dim lb As Label lb = Sender lb.Color=Colors.Red :lb.TextColor=Colors.white :lb.Text="TEST" CallSub2(Main, clicksub, lb) End Sub Click to expand... wow!!!, worked like a charm....thanx too much
CR grid cell color Mahares said: In the CRGrid class module, I added a line in the cell _click sub. See below: Code: Sub cell_click Dim i, r, c As Int Dim s As String Dim lb As Label lb = Sender lb.Color=Colors.Red :lb.TextColor=Colors.white :lb.Text="TEST" CallSub2(Main, clicksub, lb) End Sub Click to expand... wow!!!, worked like a charm....thanx too much
sanjibnanda Active Member Licensed User Longtime User Oct 30, 2012 #6 CR grid cell color chage after hitme button COBRASoft said: Without checking your code or class, I once made a grid using a module, perhaps there are some things in there you can use in yours. The code is available on this forum and is free Click to expand... sir, the cell click works fine, but how i could change the colors of some selective cells after clicking hit-me button ... kind regards, sanjib
CR grid cell color chage after hitme button COBRASoft said: Without checking your code or class, I once made a grid using a module, perhaps there are some things in there you can use in yours. The code is available on this forum and is free Click to expand... sir, the cell click works fine, but how i could change the colors of some selective cells after clicking hit-me button ... kind regards, sanjib