CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    Combo width is too narrow, can I show a label flag something to show the whole content?

    Combo width is too narrow, it can not show the whole info I want to show. I wonder if I can show a label flag something to show the whole content?

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Combo width is too narrow, can I show a label flag something to show the whole content?

    'this will make the text area wider

    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()
    ' set the width for the dropdown list.
    SendMessage Combo1.hwnd, _
    CB_SETDROPPEDWIDTH, 300, 0

    ' Select the first choice.
    Combo1.ListIndex = 0
    End Sub




    Iouri Boutchkine
    iouri@hotsheet.com
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

  3. #3
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Re: Combo width is too narrow, can I show a label flag something to show the whole content?

    Also try this in Form_Load event
    YourCombo.ToolTipText=YourCombo.Text
    It creates yellow Tip with the context of your control when you point mouse for a second .
    Vlad


  4. #4
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    Re: Combo width is too narrow, can I show a label flag something to show the whole content?

    I want to show the tootiptext when I expand the combobox and the mouse is on one of the long content option. I want to know which event I need to use.

    Thanks!

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  5. #5
    Join Date
    Mar 2001
    Posts
    71

    Re: Combo width is too narrow, can I show a label flag something to show the whole content?

    Hi,

    Try using combo box of Microsoft Form2 Controls.
    It has a listwidth property.when the combobox is in drop down position,The list expands to show the contents.

    Hope it helps.


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

Featured