title: From cell coordinates to Canvas pixel position on OnSelectCell event in tStringGrid in Delphi
body: <p>The <b>OnDrawCell</b> event gives me a "Rect" record so that I know where the real pixel coordinates are:</p>
  
  <pre><code>OnDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
  </code></pre>
  
  <p>On the other hand, the <b>OnSelectCell</b> only gives me the row/col coordinates.</p>
  
  <pre><code>OnSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);
  </code></pre>
  
  <p>How do I translate the row/col to pixel coordinates?</p>
  
  <p>I need those because I need to create a ComboBox at runtime to cover the whole selected cell, but only when the cell is selected. I know how to do everything, but I do not know how to get the coordinates (right now, I am just creating the combo at 0,0 of the parent tStringGrid).</p>
  
  <p>I am using Delphi7, but I think it is a general question and not related to the Delphi version.</p>
  
  <p>PS: I am aware that there are plenty of commercial and freeware components that implement a combobox inside a cell, but I cannot and/or do not want to use them.</p>
  
  <p>Thank you</p>