mrhicks
September 24th, 2001, 08:29 PM
Hello all,
I have this same MSHFlexGrid control on my form. At a specific time I would like to know what the total length of the of rows by adding the columns together and the total height by adding all the rows in a columns together. This gives me the outter most perimeter of the grid. Used so when the mouse goes outside this area it doesn't display tooltips. Any how, when to go to determine these values I am running into problems. By using the debugger executing the commands, MSHFlexGrid1.RowHeight(0) or MSHFlexGrid1.ColWidth(0), it is returning a resultant of -1, which is the default values. From MSDN
You can set ColWidth to zero to create invisible columns, or to –1 to reset the column width to its default value, which depends on the size of the current font.
Okay, so a setting of -1 is the default value, that is fine and dandy, but I need to extract the actually value of the width and height. How do I get these values correctly. MSDN defines the default to be based upon the size of the currently font, but how do I get the width and height of a cell from that? Font.Size * screen.TwipsPerPixelX ?? That doesn't seem to work either. Maybe there is an easier way to determine the total length and height of the grid????
Thanks
Mark
I have this same MSHFlexGrid control on my form. At a specific time I would like to know what the total length of the of rows by adding the columns together and the total height by adding all the rows in a columns together. This gives me the outter most perimeter of the grid. Used so when the mouse goes outside this area it doesn't display tooltips. Any how, when to go to determine these values I am running into problems. By using the debugger executing the commands, MSHFlexGrid1.RowHeight(0) or MSHFlexGrid1.ColWidth(0), it is returning a resultant of -1, which is the default values. From MSDN
You can set ColWidth to zero to create invisible columns, or to –1 to reset the column width to its default value, which depends on the size of the current font.
Okay, so a setting of -1 is the default value, that is fine and dandy, but I need to extract the actually value of the width and height. How do I get these values correctly. MSDN defines the default to be based upon the size of the currently font, but how do I get the width and height of a cell from that? Font.Size * screen.TwipsPerPixelX ?? That doesn't seem to work either. Maybe there is an easier way to determine the total length and height of the grid????
Thanks
Mark