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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Set MSFLEXGRID.CellHeight property

Status
Not open for further replies.

AceK

IS-IT--Management
Joined
Dec 10, 2003
Messages
5
Location
US
With MSFlexGrid1(0)
.FixedRows = 0
.Rows = 3
.Cols = 1
.ColWidth(0) = 1980
.Width = 1980
.Height = 720
.Left = 50
.Top = 150
.BorderStyle = 0
.BackColorBkg = &H4040&

.Row = 0
.Col = 0
.CellHeight = 225
.FontSize = 7
.CellBackColor = vbWhite

.Row = 1
.Col = 0
.CellHeight = 225
.CellBackColor = vbBlue

.Row = 2
.Col = 0
.CellHeight = 225
.CellBackColor = vbGreen
.GridLines = flexGridInset
.GridColor = &H80000008
.ScrollBars = flexScrollBarNone
End Sub

I need to set the Each Row height and wanted to use .CellHeight = Value but it does not work

I want to use Font Size 7 and it doesn't look appropriate with RowHeight being so big. So how can I squeze ROW size.


Please help me
 
Hi,

Use

Code:
With MSFlexGrid(0)
    .Row = 0
    .RowHeight(.Row) = 255
End With

From what I can see from the doco, .CellHeight only returns the cell height, it doesnt allow you to set it ...


Hope this helps ...
 
No PS42 RowHeight(.Row) has the same functionality as .cellHeight.
You can set RowHeight to zero to create invisible rows, or to –1 to reset the row height to its default value. The default row height varies according to the current font size.

It didn't work, I would think why is such a behaviour.
They do say Row height depends on Font size but It doesn't work either because I used Font size 7 and Arial Narrow.It didn't change the ROW height, It is always default to 240.

I don't understand why Microsoft Claims that you can set the height of an induvidual row.
 
It worked , It worked PS2 It worked I didn't have to change the Rowheight all I had to do is change the .Font Size after creating the ROWS

Let me know if u need the code

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top