Re: Combo Box
You could try using the windows API call for sending a message to the window
(combo box) (SendMessageLong) you are after with the appropriate constant
for setting the tab stops. Then you can add you text as one string with a
vbTab separating the two elements. They should line-up then in what look
like two columns in the combo box (also would work for text box, listbox,
etc.) BTW - Dan Appleman's book on programming the windows API using VB is
excellent. There are also a lot of other web sites with tips like this one
with actual code examples that work.
I hope this helps.
"Craig Pearson" <email@example.com> wrote:
>I'm trying to fill a combo box so that the items appear in a column like
>order seperated by a tab. The data is coming from a recordset and I
>basically want to concatenate 2 fields, but have them displayed like this:
>123 Item 1
>2 Item 2
>1023 Item 3
>24 Item 4
>I have tried using a constant value represent the length of the first column
>and any items that are less than this value add spaces, which doesn't align
>the second column very well.
>Any ideas greatly appreciated.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL