Results 1 to 6 of 6

Thread: [RESOLVED] Bold text in MSFlexGrid

  1. #1

    Thread Starter
    Hyperactive Member Tarablue's Avatar
    Join Date
    Feb 2007
    Location
    Somewhere West of GMT
    Posts
    398

    Resolved [RESOLVED] Bold text in MSFlexGrid

    Hello All,

    I have an MSFlexGrid with several rows. What I cannot seem to get is for the first row, Row 0, to be bold and the other rows to be normal. I either get all or nothing bolded. Code tried:-

    MSFlexGrid1.row = 0
    MSFlexGrid1.Font.Bold = True

    MSFlexGrid1.row = 1
    MSFlexGrid1.Font.Bold = False

    etc.

    Tarablue

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member Tarablue's Avatar
    Join Date
    Feb 2007
    Location
    Somewhere West of GMT
    Posts
    398

    Re: Bold text in MSFlexGrid

    Thank you RhinoBull, I will try that.

    Does this mean I need to write this for every cell, although thinking about it as I type, I could write a Do/Until loop too cover all the cells. Yes that might just work. I'll let you know

    Tarablue

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Bold text in MSFlexGrid

    Do you want to bold certain cells or entire cells in the grid...if you want to do it for certain cells then you need to specify for each cell or you can use do/until loop
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Bold text in MSFlexGrid

    You may not need a loop. The Flexgrid has a "repeat style" that affects a range of cells. For example, the following will bold all cells in column 3

    Code:
        
    With Me.MSFlexGrid1
            .FillStyle = flexFillRepeat
            .Row = .FixedRows
            .Col = 2
            .RowSel = .Rows - 1
            .CellFontBold = True
            .FillStyle = flexFillSingle
    End With

  6. #6

    Thread Starter
    Hyperactive Member Tarablue's Avatar
    Join Date
    Feb 2007
    Location
    Somewhere West of GMT
    Posts
    398

    Re: Bold text in MSFlexGrid

    Hello brucevde,

    That just might work for rows if I change the code around!

    Thank You
    Tarablue

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