Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a Flex Grid Header Bold

Status
Not open for further replies.

dlpastel

Programmer
Aug 8, 2002
114
US
I am trying to make a MSHFlex grid have a header which is bold.

I can't seem to get it right. Here is what I have so far:

Sub gridSet(aGrid As MSHFlexGrid, arecordset As ADODB.Recordset, aprgmname As String)
Set aGrid.DataSource = Nothing
Set aGrid.DataSource = arecordset

With aGrid
'Show the grid
.Visible = True

'Stop redrawing of the grid until we make all the changes. (This reduces flicker)
.Redraw = False

'When the user clicks on a header the entire row is selected.
.AllowBigSelection = True

'Changes made to any cel's properties affect all cels in the grid
.FillStyle = flexFillRepeat

'Move to the header which is row 0
.Row = 0
.Col = 0

'Set row 0 to be a fixed row
.RowSel = .FixedRows

' Set column 0 to be a fixed column
' .ColSel = .Cols

' Make the Header Row (0) bold
.CellFontBold = True

'Make the first row and column fixed
.FixedRows = 1

'Move to the first row and column
.Row = 1
.Col = 1

'When the user clicks on a header only the current record is selected
.AllowBigSelection = False

'A property change of one cell changes the properties of all cells
.FillStyle = flexFillSingle

'Set the backround color of the current cel
.CellBackColor = &HC0FFFF

'Now that the changes are made, redraw the grid
.Redraw = True
'Make the grid the current focus
.SetFocus

End With
Exit Sub
End Sub

Any help would be really appreciated.

Thanks,
Dan
 
You can change the font properties for the header (FontFixed) or for the text in the others cells (Font), in the properties page of the MSHFlexGrid.
Just right click it, select Property, then select the tab Font and there it is.

Hope this helps,
David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top