grid controls?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • margetts

    grid controls?

    Hey there, just wondering if there are any built-in grid controls or what
    people use.

    N.B below isnt correct code (obviously) its just my mental interpretation so
    you guys can understand easier

    My purpose is a game, i need a grid about 12x12 'cells', i need to be able
    to apply code to each 'cell' for the purpose of adding text, and reading.
    e.g
    cell1a.text = "R"

    I also need to create a loop (that, i can do) that starts at one cell, and
    then moves along the row,
    e.g
    cell1a.text = "" then check cell1b

    and so on, and then i need to be able to move down onto the next row in the
    event of a cell having information.
    e.g
    cell1a.text = "" then check cell1b
    cell1b.text = "" then check cell1c
    cell1c.text = "D" then check sell 2c

    (notice in cell1c how i want it too move down?)

    thanks guys i got a really good and quick respons last time good work :-D,
    if u cant help me with the whole thing thats fine, - help appreciated!!

    -Jason



  • preben nielsen

    #2
    Re: grid controls?


    "margetts" <margetts@bigpo nd.com> skrev i en meddelelse
    news:UvdPc.2804 2$K53.11792@new s-server.bigpond. net.au...[color=blue]
    > Hey there, just wondering if there are any built-in grid[/color]
    controls or what[color=blue]
    > people use.
    >
    > N.B below isnt correct code (obviously) its just my mental[/color]
    interpretation so[color=blue]
    > you guys can understand easier
    >
    > My purpose is a game, i need a grid about 12x12 'cells', i need[/color]
    to be able[color=blue]
    > to apply code to each 'cell' for the purpose of adding text, and[/color]
    reading.[color=blue]
    > e.g
    > cell1a.text = "R"
    >
    > I also need to create a loop (that, i can do) that starts at one[/color]
    cell, and[color=blue]
    > then moves along the row,[/color]

    Make a simple UserControl that acts as like you want it. This
    should not take an hour to program (Worst case scenario)

    --
    /\ preben nielsen
    \/\ prel@post.tele. dk


    Comment

    • Steve Gerrard

      #3
      Re: grid controls?


      "margetts" <margetts@bigpo nd.com> wrote in message
      news:UvdPc.2804 2$K53.11792@new s-server.bigpond. net.au...
      | Hey there, just wondering if there are any built-in grid controls or
      what
      | people use.
      |
      | My purpose is a game, i need a grid about 12x12 'cells', i need to be
      able
      | to apply code to each 'cell' for the purpose of adding text, and
      reading.
      | e.g
      | cell1a.text = "R"
      |
      | I also need to create a loop (that, i can do) that starts at one cell,
      and
      | then moves along the row,
      | e.g
      | cell1a.text = "" then check cell1b
      |
      | and so on, and then i need to be able to move down onto the next row
      in the
      | event of a cell having information.
      ||

      Try the Microsoft Hierarchical Flexgrid Control 6.0 (so named in the
      components list).

      This code shows how to setup a 12 x 12 grid and fill it with random
      data, and should give you an idea of how to make loops that check
      things, etc.

      Private Sub Form_Load()
      Dim n As Long
      Dim j As Long
      Dim r As Single

      Randomize

      With Me.MSHFlexGrid1

      .FixedCols = 0
      .FixedRows = 0
      .Cols = 12
      .Rows = 12

      For n = 0 To .Cols - 1
      .ColWidth(n) = 400
      Next n

      For n = 0 To .Cols - 1
      For j = 0 To .Rows - 1
      r = Rnd
      If r > 0.75 Then
      .TextMatrix(j, n) = "R"
      End If
      Next j
      Next n

      End With

      End Sub




      Comment

      Working...