Results 1 to 2 of 2

Thread: Grids and Colors

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Location
    Manila
    Posts
    85

    Grids and Colors

    hi.. i was wondering how you would change a specific cell in a grid. Is it easier when using a datagrid, MSHFlexGrid or a MSFlexGrid.

    I am creating a monitoring system for inventory and i want to be able to highlight the inventory that has no more stock left. Thanks.

  2. #2
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    Re: Grids and Colors

    I d prefer the Flex Grid.

    see this example
    Code:
    Private Sub Command1_Click()
        Dim i As Integer
        With MSFlexGrid1
            
            For i = 0 To .Cols - 1
                .Row = 3
                .Col = i
                .CellBackColor = vbRed
            Next
            
            For i = 0 To .Cols - 1
                .Row = 1
                .Col = i
                .CellBackColor = vbCyan
            Next
            
            .Row = 2
            .Col = 1
            .CellBackColor = vbGreen
            
            .Row = 4
            .Col = 3
            .CellBackColor = vbGreen
            
        End With
    End Sub
    IIF(Post.Rate > 0 , , )

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