Results 1 to 6 of 6

Thread: msflexgrid Text Colour Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Wink msflexgrid Text Colour Help

    I need help on two things:

    First How do I change the colour, style of the font for a whole row in the msflexgrid control in code
    And Only That Row

    secondly: How do I Hide A column In the Flex Grid Control

    Help Would be much Appreciated


    HELP!!!!!!!!!!!!!!!!!!!

  2. #2
    Member
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    45

    hide a column

    try...

    .ColWidth(idx)

    where idx is the index of the column to be hidden
    If I could only remember my name...

  3. #3
    sarun
    Guest
    Check out the CellForColor/CellFontName properties of the mshflexgrid control.

    this changes color/font for a single cell. Not sure if there is a similar one for Row. If not may be you need to loop though all cells in the row???

  4. #4
    Member
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    45

    hide a column

    Sorry, I forgot the assignment of zero

    .ColWidth(idx) = 0

    where idx is the index of the column to be hidden
    If I could only remember my name...

  5. #5
    ashky
    Guest
    'Sub routine to set the color and bold property

    Sub ChangeBackColour(ByVal lngColour As Long, ByVal blnFontBold As Boolean)
    Dim i As Integer

    For i = 0 To MSFlexGrid1.Cols - 1
    MSFlexGrid1.Col = i
    MSFlexGrid1.CellForeColor = lngColour
    MSFlexGrid1.CellFontBold = blnFontBold
    Next i
    End Sub


    In the form load event just call the funtion . For example:

    For intRow = 0 To MSFlexGrid1.Rows - 1
    If Val(MSFlexGrid1.TextMatrix(intRow, intCol)) = 1 Then
    MSFlexGrid1.Row = intRow
    ChangeBackColour vbRed, False
    End If
    Next


    hope this helps ....,


    ashky

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    MSFlex Grid Colour

    Thank You Very Much However I gave Up A while ago and bought myself the VSFlex grid it is amazing what other nice features comes with it

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