Results 1 to 6 of 6

Thread: ComboBox DropDown size

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154
    I am using VB6. Following is the procedures in the MSDN that tells how to change the size of the dropdown area of a ComboBox. However, it does not seem to work. Does anyone know if I need to add a reference or somehow set something to get this to work?????


    To set the size of the combo box drop-down area

    Click the drop-down arrow at the right of the combo box.
    The outline of the control changes to show the size of the combo box with the drop-down area extended.

    Use the bottom sizing handle to change the initial size of the drop-down area.


    Click the drop-down arrow again to close the drop-down portion of the combo box.

  2. #2

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154
    Thanks for the response. However, I do not believe that they are talking about a simple combo becasue the instructions say to click on the drop down arrow and there is no drop down arrow on a simple ComboBox. Plus, the instructions in MSDN also have a picture next to it???????

  4. #4

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Wink This only work for making the dropdown list wider

    Hi Steve Thomas, hope this can help you.

    Code:
    Option Explicit
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
    Private Const CB_SETDROPPEDWIDTH = &H160
    
    Private Sub Form_Load()
        With Combo1
            .AddItem "Item 1"
            .AddItem "Item 2"
            .AddItem "Item 3"
            .AddItem "Item 4"
            .AddItem "Item 5"
        End With
        SendMessage Combo1.hwnd, CB_SETDROPPEDWIDTH, 500, 0
    End Sub

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154
    Thanks for the help. It doesn't seem to do anything. It is almost like there is another setting that locks it. Have you tried following the doc and manually setting an ADO comboBox?? if so does it work for you?????

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