Results 1 to 2 of 2

Thread: Alternate Colored Rows in FlexGrid

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381

    Post

    I've heard that you can use alternate row colors in a VB FlexGrid. I need to have the even rows one color and the odd orws another like Greenbar computer paper. How can this be done?

    Rev. Michael L. Burns

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284

    Post

    The only way I know to do this would be to use 2 For loops and run down through the grid changing the backcolor of each cell on each row.....I have used this successfully and it is reasonable fast.

    If you set up 2 loops and use the optional keyword 'Step' you can run down through the even rows

    For i = 2 to grddata.rows Step 2
    :
    :
    And then run down through the odd rows

    For i = 1 to grddata.rows Step 2

    Just looking at that there you might want to be careful that it doesn't step over a last row into oblivion and give you an error but I'm sure you can get a way around that


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width