|
-
September 28th, 1999, 04:31 PM
#1
Flex Grid
In a Flexgid control i want to Print all column headings with font 'bold', but all the values in the cell to normal font.
also for flexgrid i want to set the values in the cell to center align . i used msflex.Cellalignment = flexAlignCenterCenter.
it worked only for first cell. i want all cells to be center aligned.
can any one tell me how to do that?
Thanks in advance.
Bill
-
September 29th, 1999, 03:55 AM
#2
Re: Flex Grid
for i = 0 to NumberOfRows
MSFlexGrid1.CellAlignment = vbCenter
if i=0 then MSFlexGrid1.CellFontBold = true
next i
Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
-
September 29th, 1999, 12:20 PM
#3
Re: Flex Grid
Here's an easy way to handle the centering of all cells (excluding fixed rows/columns) :
With YourFlexGridControl
.Redraw = false ' turn of flickering / highlight
.FillStyle = flexFillRepeat ' apply to all selected cells
.Col = .FixedCols ' set col
.Row = .FixedRows ' set row
.ColSel = .Cols - 1 ' set selected col position
.RowSel = .Rows - 1 ' set selected row position
.CellAlignment = flexAlignCenterCenter ' apply cell alignment to all
.Col = 0 ' reset col
.Row = 0 ' reset row
.Col = .FixedCols
.Row = .FixedRows
.FillStyle = flexFillSingle
.Redraw = true
End With
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
October 1st, 1999, 03:09 PM
#4
Re: Flex Grid
Thank you very much. It worked fine. also is it possible in Flex grid to print column headings in 'bold' and all other values to not bold?
Bill.
-
October 1st, 1999, 05:26 PM
#5
Re: Flex Grid
You can use the same (kind-of) code snippet -
With MSFlexGrid1
.Redraw = false ' turn of flickering / highlight
.FillStyle = flexFillRepeat ' apply to all selected cells
.Col = .FixedCols ' set col
.Row = 0 ' set row
.ColSel = .Cols - 1 ' set selected col position
.RowSel = .FixedRows ' set selected row position
.CellAlignment = flexAlignCenterCenter ' apply cell alignment to all
.CellFontBold = true
.Col = 0 ' reset col
.Row = 0 ' reset row
.Col = .FixedCols
.Row = .FixedRows
.FillStyle = flexFillSingle
.Redraw = true
End With
This will center and make bold all of the column headers in the flexgrid.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
October 4th, 1999, 10:08 AM
#6
Re: Flex Grid
Thank you very much for your reply.
Bill
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|