Results 1 to 5 of 5

Thread: How to Increase the width of the Pull-Down bar of the Combo Box

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    mumbai(india)
    Posts
    26

    Unhappy How to Increase the width of the Pull-Down bar of the Combo Box

    How to Increase the width of the Pull-Down bar (The portion of the Combo box, on clicking brings the pull down listings)

  2. #2
    Tygur
    Guest
    Do you want to increase the width of the list that drops down or the button you click to show them?

    If you want to increase the width of the list that drops down, you can use this code:
    Code:
    'Put this above the rest of the code in the form (in the General Declarations area)
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Const CB_SETDROPPEDWIDTH = &H160
    
    'Then use this line to change the width of the list that drops down.  You can change NewWidthInPixels to be whatever you want the width to be, in pixels.
    SendMessage Combo1.hWnd, CB_SETDROPPEDWIDTH, NewWidthInPixels, 0&

  3. #3
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Hey Tygur,

    Do you know how to change the icon displayed in the combox box, I mean the little arrow you click on, to a custom ico file?

  4. #4
    Tygur
    Guest
    Unfortunately, I couldn't find any information in the MSDN library about changing the size of the button in the combobox or putting an icon on it. I'll look again later, though.

  5. #5
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Thanks Tygur

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width