title: Calculating StringGrid height when adding a row
body: <p>Given that I want my string grid to have equal height rows ...</p>
  
  <p>I know that it will start with exactly 5 rows and I make it so at design time.</p>
  
  <p>At run time I may want to add some extra rows (and I have code to not add below the bottom of the parent; at that point I rely on scroll bars).</p>
  
  <p>It seems that sg.height := sg.height + sg.RowHeights[0]; is not producing the expected result - there is unexpecetd whitespace after the last row (I am still trying to calculate how the extra height corresponds to the number of rows, but it looks like it is the height of one row, no matter how many rows are in the grid).</p>
  
  <p>Is there something else I should take into account? (perhaps GridLineWidth?) Or could I have set a property wrongly in the Object Inspector? Should I be using <code>GridHeight</code>, rather than <code>Height</code>?</p>
  
  <p>Note: this problem only occurs when the stringgid is as wide as all cells and the scroll bar appears, drawing over part of the last column. If I leave an ugly blank sapce at the right of the string grid for the scroll bar to fit into, the problem does not occur.</p>
  
  <p>Can anyone tell me the formula to calculate the new gridheight after adding a number of rows? Or wthere I am doing something wrong.</p>
  
  <hr>
  
  <p>[Update] The fudge factor of 3 apears to correspond to the <code>margin</code> property</p>