Results 1 to 3 of 3

Thread: Flexgrid doubt..

  1. #1

    Thread Starter
    Hyperactive Member segrobiur's Avatar
    Join Date
    May 2004
    Location
    Portugal
    Posts
    371

    Question Flexgrid doubt..

    Hi there...

    I have a doubt regarding the MSFlexgrid:
    Is it possible to have in the same flexgrid rows (or columns) with different text colors?

    thanks in advance..

  2. #2
    Addicted Member
    Join Date
    May 2005
    Posts
    168

    Re: Flexgrid doubt..

    Hi,

    Yes, you can change the cellforecolor of each cell in the row or column.

    VB Code:
    1. Dim i As Integer
    2.  
    3. With MSFlexGrid1
    4.     .Cols = 10
    5.     For i = 1 To .Cols - 1
    6.         .Row = 1
    7.         .Col = i
    8.         .CellForeColor = IIf(i Mod 2 = 1, vbGreen, vbRed)
    9.         .TextMatrix(.Row, .Col) = "text"
    10.     Next i
    11. End With

    Have a good one!
    BK

  3. #3

    Thread Starter
    Hyperactive Member segrobiur's Avatar
    Join Date
    May 2004
    Location
    Portugal
    Posts
    371

    Re: Flexgrid doubt..

    many thanks...

    I'll give it a go

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