<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : [WORKAROUND] InplaceEdit Position</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [WORKAROUND] InplaceEdit Position]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 19:57:22 +0000</pubDate>
  <lastBuildDate>Thu, 19 May 2011 22:41:03 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18404</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[[WORKAROUND] InplaceEdit Position : Workaround:    Private Declare...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18404&amp;PID=64496&amp;title=workaround-inplaceedit-position#64496</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 18404<br /><strong>Posted:</strong> 19 May 2011 at 10:41pm<br /><br />Workaround:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long<br><br>Private Const SWP_NOZORDER As Long = &amp;H4<br>Private Const SWP_SHOWWINDOW As Long = &amp;H40<br><br><br>Private Sub ReportControl1_BeginEdit(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)<br>&nbsp;&nbsp; ' Set the edit window position to match the text vertically aligned position<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Dim l_Left As Long, l_Top As Long, l_Right As Long, l_Bottom As Long<br>&nbsp;&nbsp; Dim lo_OldFont As StdFont<br>&nbsp;&nbsp; Dim l_TextHeight As Long<br>&nbsp;&nbsp; Dim l_Offset As Long<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; If Row Is Nothing Then Exit Sub<br>&nbsp;&nbsp; If Item Is Nothing Then Exit Sub<br>&nbsp;&nbsp; If Me.ReportControl1.InplaceEditHwnd = 0 Then Exit Sub<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Get the height of the font<br>&nbsp;&nbsp; Set lo_OldFont = UserControl.Font<br>&nbsp;&nbsp; Set Me.Font = Me.ReportControl1.PaintManager.TextFont<br>&nbsp;&nbsp; l_TextHeight = Me.ScaleY(Me.TextHeight("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&amp;*()_+-={}\&#091;&#093;|:"";'&lt;&gt;,.?/~`"), Me.ScaleMode, vbPixels)<br>&nbsp;&nbsp; Set Me.Font = lo_OldFont<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Get the RECT of the Cell<br>&nbsp;&nbsp; Row.GetItemRect Item, l_Left, l_Top, l_Right, l_Bottom<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Calculate the offset for the edit window<br>&nbsp;&nbsp; l_Offset = Int((l_Bottom - l_Top) / 2 + 0.5) - Int((l_TextHeight / 2) + 0.5) - IIf((l_Bottom - l_Top) Mod 2 = 0, 1, 2)&nbsp; ' Probably a better way to do this but it works for now across a range of row heights that I tested<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Add the offset to the TOP position, and subtract it from the HEIGHT of the edit window<br>&nbsp;&nbsp; SetWindowPos Me.ReportControl1.InplaceEditHwnd, 0, l_Left + 2, l_Top + l_Offset, l_Right, l_Bottom - l_Offset, SWP_NOZORDER + SWP_SHOWWINDOW<br>End Sub<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Thu, 19 May 2011 22:41:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18404&amp;PID=64496&amp;title=workaround-inplaceedit-position#64496</guid>
  </item> 
  <item>
   <title><![CDATA[[WORKAROUND] InplaceEdit Position :   If you set the height for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18404&amp;PID=64472&amp;title=workaround-inplaceedit-position#64472</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 18404<br /><strong>Posted:</strong> 19 May 2011 at 1:33am<br /><br />If you set the height for a row in the MeasureRow event, and set the Alignment for a column to use VCenter, when you click to edit the item, the edit window no longer lines up vertically with the text - is there a way to set the vertical alignment of the InplaceEdit window?]]>
   </description>
   <pubDate>Thu, 19 May 2011 01:33:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18404&amp;PID=64472&amp;title=workaround-inplaceedit-position#64472</guid>
  </item> 
 </channel>
</rss>