<?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 : How to adjust a ComboBox height</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : How to adjust a ComboBox height]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 15:36:55 +0000</pubDate>
  <lastBuildDate>Wed, 10 Nov 2010 22:10:42 +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=17546</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[How to adjust a ComboBox height : Dear jpbro,  Thank you for advice! The...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61344&amp;title=how-to-adjust-a-combobox-height#61344</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2548">Norika</a><br /><strong>Subject:</strong> 17546<br /><strong>Posted:</strong> 10 November 2010 at 10:10pm<br /><br /><DIV>Dear jpbro,</DIV><DIV>&nbsp;</DIV><DIV>Thank you for advice!</DIV><DIV>The height of ComboBox was displayed definitely when I tried the code that had you shown, <FONT color=#cc6600><strong>but the rectangle&nbsp;of the pull-down listbox has shortened</strong></FONT>.</DIV><DIV>I tried to drew the pull-down list box after your method again, but do not get along well.<BR>Is there any good idea?</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/2548/ComboBox_Customizati&#111;n_ListboxHeightb.jpg" height="426" width="481" border="0" /></DIV><DIV>&nbsp;&nbsp;</DIV><DIV><img src="uploads/2548/CJVer.jpg" height="114" width="396" border="0" /></DIV><DIV><DIV><DIV></DIV>Norika</DIV><DIV>---</DIV><DIV>Product: Xtreme SuitePro (ActiveX) version 13.4.2 <BR>Platform: Windows XP (32bit) - SP 3<BR>Language: Visual Basic 6.0 SP6&nbsp;<BR><a href="https://forum.codejock.com/uploads/2548/Adjust_ComboBox_Height_Rev_1.zip" target="_blank">uploads/2548/Adjust_ComboBox_Height_Rev_1.zip</A></DIV></DIV>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 22:10:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61344&amp;title=how-to-adjust-a-combobox-height#61344</guid>
  </item> 
  <item>
   <title><![CDATA[How to adjust a ComboBox height : Try this: Option ExplicitPrivate...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61343&amp;title=how-to-adjust-a-combobox-height#61343</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 17546<br /><strong>Posted:</strong> 10 November 2010 at 3:52pm<br /><br />Try this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private Type RECT<br>&nbsp;&nbsp; Left As Long<br>&nbsp;&nbsp; Top As Long<br>&nbsp;&nbsp; Right As Long<br>&nbsp;&nbsp; Bottom As Long<br>End Type<br><br>Private Type POINTAPI<br>&nbsp;&nbsp; x As Long<br>&nbsp;&nbsp; y As Long<br>End Type<br><br>Private Declare Function SendMessageLong Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long<br>Private Declare Function GetWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal wCmd As Long) As Long<br>Private Declare Function GetWindowRect Lib "user32.dll" (ByVal hwnd As Long, ByRef lpRect As RECT) As Long<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 GW_CHILD As Long = 5<br>Private Const CB_SETITEMHEIGHT As Long = &amp;H153<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; SetComboHeight 675<br>End Sub<br><br>Private Sub SetComboHeight(ByVal p_HeightTwips As Long)<br>&nbsp;&nbsp; Dim l_Hwnd As Long<br>&nbsp;&nbsp; Dim lt_EditRect As RECT<br>&nbsp;&nbsp; Dim lt_Pt As POINTAPI<br>&nbsp;&nbsp; Dim lt_Pt2 As POINTAPI<br>&nbsp;&nbsp; Dim l_YOffset As Long<br>&nbsp;&nbsp; Dim l_FontHeight As Long<br>&nbsp;&nbsp; Dim lo_OldFont As StdFont<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; On Error GoTo ErrorHandler<br><br>&nbsp;&nbsp; SendMessageLong Me.ComboBox1.hwnd, CB_SETITEMHEIGHT, -1, p_HeightTwips / Screen.TwipsPerPixelY - 6<br><br>&nbsp;&nbsp; l_Hwnd = GetWindow(Me.ComboBox1.hwnd, GW_CHILD)<br><br>&nbsp;&nbsp; If l_Hwnd &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetWindowRect l_Hwnd, lt_EditRect<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Pt.x = 3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Pt.y = 1<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Pt2.x = lt_EditRect.Right - lt_EditRect.Left - lt_Pt.x * 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Pt2.y = lt_EditRect.Bottom - lt_EditRect.Top - 2<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lo_OldFont = Me.Font<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Me.Font = Me.ComboBox1.Font<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l_FontHeight = Me.TextHeight(Me.ComboBox1.Text)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Me.Font = lo_OldFont<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l_YOffset = (p_HeightTwips - l_FontHeight) \ 2 \ Screen.TwipsPerPixelY<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetWindowPos l_Hwnd, 0, lt_Pt.x, lt_Pt.y + l_YOffset - 1, lt_Pt2.x + 1, lt_Pt2.y - (l_YOffset - 2), 0<br>&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp; Exit Sub<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; <br>ErrorHandler:<br>&nbsp;&nbsp; Debug.Print Err.Description<br>End Sub<br></pre></td></tr></table><br><br>Seems to work okay for Style = DropDown or Style = DropDownList with EnableMarkup = True.<br><br>Haven't tested it extensively, but it should put you on the right track.<br><br>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 15:52:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61343&amp;title=how-to-adjust-a-combobox-height#61343</guid>
  </item> 
  <item>
   <title><![CDATA[How to adjust a ComboBox height : &amp;gt; I want to expand the ComboBox...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61342&amp;title=how-to-adjust-a-combobox-height#61342</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1570">Jebo</a><br /><strong>Subject:</strong> 17546<br /><strong>Posted:</strong> 10 November 2010 at 2:15pm<br /><br />&gt; I want to expand the ComboBox height&nbsp;without change its font size.<br>Oh yes yes yes!!! I WANT IT TOO !!! <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" alt="Clap" title="Clap" /><br>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 14:15:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61342&amp;title=how-to-adjust-a-combobox-height#61342</guid>
  </item> 
  <item>
   <title><![CDATA[How to adjust a ComboBox height : Dear Sirs,  I want to expand...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61321&amp;title=how-to-adjust-a-combobox-height#61321</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2548">Norika</a><br /><strong>Subject:</strong> 17546<br /><strong>Posted:</strong> 09 November 2010 at 11:00pm<br /><br /><DIV>Dear Sirs,</DIV><DIV>&nbsp;</DIV><DIV>I want to expand the ComboBox height&nbsp;without change its font size.</DIV><P>So I made a sample program.&nbsp; Is this a principled approach? (2nd way&nbsp;below sample)</P><DIV><img src="https://forum.codejock.com/uploads/2548/pic1.gif" height="248" width="481" border="0" /></DIV><DIV><BR>&nbsp;</DIV><DIV><DIV></DIV>Norika</DIV><DIV>---</DIV><DIV>Product: Xtreme SuitePro (ActiveX) version 13.4.2 <BR>Platform: Windows XP (32bit) - SP 3<BR>Language: Visual Basic 6.0 SP6&nbsp;<BR><BR><a href="https://forum.codejock.com/uploads/2548/ComboBoxSample.zip" target="_blank">uploads/2548/ComboBoxSample.zip</A></DIV>]]>
   </description>
   <pubDate>Tue, 09 Nov 2010 23:00:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17546&amp;PID=61321&amp;title=how-to-adjust-a-combobox-height#61321</guid>
  </item> 
 </channel>
</rss>