none
How To Make A Grid Of 26 x 26 in small basic

Answers

  • Yash Arora Programming,

    In the "Search Box" above type in "Make a Grid in Small Basic" you will see several examples. One of those was made by LitDev who is very good at programming. Below is his example. I would suggest that you look up his post as it gives a good discussion on how the grid works.

    rows = 8
    columns = 8
    size = 40
    offsetX = (GraphicsWindow.Width-rows*size)/2
    offsetY = (GraphicsWindow.Height-columns*size)/2

    For r = 1 To rows
      For c = 1 To columns
        GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
        boxes[r][c] = Shapes.AddRectangle(size, size)
        Shapes.Move(boxes[r][c],
    offsetX + (c-1)*size, offsetY + (r-1)*size )
      EndFor
    EndFor


    JR

    Tuesday, March 14, 2017 10:08 AM
    Answerer