<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Framework</title><link>https://www.dotnetzone.gr:443/cs/forums/14/ShowForum.aspx</link><description>Θέματα για threading, remoting, reflection, exception handling, security, regex κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Ύψος rtf</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9182.aspx</link><pubDate>Fri, 03 Feb 2006 19:09:38 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9182</guid><dc:creator>Ioannis P</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9182.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=9182</wfw:commentRss><description>Ευχαριστώ πολύ!!!</description></item><item><title>Απ: Ύψος rtf</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9059.aspx</link><pubDate>Tue, 31 Jan 2006 19:25:02 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9059</guid><dc:creator>Χρήστος Γεωργακόπουλος</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9059.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=9059</wfw:commentRss><description>&lt;P&gt;Για δοκίμασε τώρα:&lt;/P&gt;
&lt;P&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Public&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Function&lt;/span&gt; GetDisplayHeight(&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;ByVal&lt;/span&gt; rtfText &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;String&lt;/span&gt;, &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;ByVal&lt;/span&gt; iColWidth &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Integer&lt;/span&gt;) &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Integer&lt;/span&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; RichTextBox &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;New&lt;/span&gt; RichTextBox&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; Height &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Integer&lt;/span&gt;&lt;br /&gt; RichTextBox.Width &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; iColWidth&lt;br /&gt; RichTextBox.Text &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; rtfText&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; Start &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Integer&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; RichTextBox.TextLength&lt;br /&gt; RichTextBox.SelectionLength &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; 0&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; Line &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Integer&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; RichTextBox.GetLineFromCharIndex(Start)&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;While&lt;/span&gt; (Start &amp;gt;= 0 &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;AndAlso&lt;/span&gt; Line &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; RichTextBox.GetLineFromCharIndex(Start))&lt;br /&gt;  Height &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; Math.Max(Height, RichTextBox.GetPositionFromCharIndex(Start).Y &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;+&lt;/span&gt; RichTextBox.SelectionFont.Height &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;+&lt;/span&gt; 1)&lt;br /&gt;  Start -= 1&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;While&lt;/span&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Return&lt;/span&gt; Height&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Function&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description></item><item><title>Ύψος rtf</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9056.aspx</link><pubDate>Tue, 31 Jan 2006 18:40:15 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9056</guid><dc:creator>Ioannis P</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9056.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=9056</wfw:commentRss><description>Έχω ένα grid στο οποίο εμφανίζω rtf. Το πρόβλημα μου είναι οτι δεν μπορώ να υπολογίσω το ύψος του rtf έτσι ώστε να αλλάξω το ύψος της γραμμής του grid και να εμφανίζεται όλο το rtf. Κάπου βρήκα την παρακάτω ρουτίνα αλλά δεν κατάφερα να την κάνω να δουλέψει σε vb. Όποιος μπορεί ας βοηθήσει.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;font size="4"&gt;public int GetDisplayHeight (string sRTF, int iColWidth)&lt;br&gt;{&lt;br&gt;	RichTextBox rtfBox = new RichTextBox();&lt;br&gt;	rtfBox.Width = iColWidth;&lt;br&gt;	rtfBox.Text = sRTF;&lt;br&gt;	int start = rtfBox.TextLength;&lt;br&gt;	rtfBox.SelectionLength = 0;&lt;br&gt;	int line = rtfBox.GetLineFromCharIndex(start);&lt;br&gt;       	// Check max height of each character in each line.&lt;br&gt;	while(start &amp;gt;= 0 &amp;amp;&amp;amp; line == rtfBox.GetLineFromCharIndex(start))&lt;br&gt;	{&lt;br&gt;		height = Math.Max(height,rtfBox.GetPositionFromCharIndex(start).Y +&lt;br&gt;			rtfBox.SelectionFont.Height + 1);&lt;br&gt;         	start -= 1;&lt;br&gt;	}&lt;br&gt;	return height;&lt;br&gt;}&lt;/font&gt;&lt;/pre&gt;&lt;br&gt;</description></item></channel></rss>