Adjust drop down list width to longest string width


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Adjust drop down list width to longest string width

  1. #1
    Join Date
    May 2005
    Posts
    5

    Adjust drop down list width to longest string width

    Hello!!
    can anyone tell me how to adjust drop down list width to longest string width.
    I am using VB.net as the code behind.
    Thanx a lot

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    I believe that is the standard behavior of the dropdownlist: its width automatically adjusts to the length of the longest item in the list. Are you seeing different behavior?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    May 2005
    Posts
    5
    yea. The Dropdown list width is the size i set it to. what i want is when i click the dropdown list the dropdown should be the width of the largest string.

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    I don't know of any way to make the dropdown portion a different width than the control itself.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 02-05-2003, 12:08 PM
  2. Replies: 1
    Last Post: 06-05-2001, 06:12 AM
  3. Replies: 4
    Last Post: 11-10-2000, 01:02 AM
  4. Deadlock error.. how to remove
    By Chandra in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 12:52 PM
  5. NetUserEnum Api
    By Mike in forum VB Classic
    Replies: 0
    Last Post: 04-24-2000, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center