how to make a grid

sarkis

Member
Licensed User
Longtime User
Hello .
I need simple grids (5X5), (5X6) ... (10X10).
as B4A didn't support a real grid,
what can I use instead?
thanks
 

klaus

Expert
Licensed User
Longtime User
Could you be more precise on what kind of grid you mean.
What is supposed to be inside the grid cells ?
Should the grid fill the whole screen, or with given cell dimensions ?
etc.

You could have a look at ScrollView examples summary.

Best regards.
 
Upvote 0

sarkis

Member
Licensed User
Longtime User
Thanks for replying
May be your suggestion will work,
but at first I need to understand your code.
I am just started with B4A, so maybe I'll ask stupid questions.
For example how simply to draw a line , a circle, geometric figures(circle, ellipse... )
I don't see any of these objects in designer.
May be I need to download some libraries?
About the problem.
I decided write a simple game.
Problem is the following.
Depends on player's reaction,
some of cells may be change their color and
on the one of them may have appears a picture (which does not complitly fill the whole cell)
thanks
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
For your project I would suggest you to use either Panels or ImageViews and draw everything onto these. With the transparency feature you can play with different layers.
The choice between Panels and ImageView depends on what event you need. Panes support the Touch event, this is not available for ImageViews. If you need any user action management you should use Panels.
Have a look at the Beginner's Guide chapter 16.2.2 Simple drawing functions.

Best regards.
 
Upvote 0
Top