How do I put a tab space in a comboBox
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: How do I put a tab space in a comboBox

  1. #1
    Join Date
    Mar 2004
    Posts
    15

    Lightbulb How do I put a tab space in a comboBox

    Hi,

    I have a problem like adding tab space in a ComboBox
    I mean,

    I have to give the values of a combo box like...

    New Opportunity Description of the New Opportunity

    I tried with
    New Opportunity\tDescription of the New Opportunity

    But its dispalying a Junk instead of a tab space.
    New Opportunity|Description of the New Opportunity

    Could any one please help me...

    Urgent requirement.

    Thanks in advance.
    Suyambulingam

  2. #2
    Join Date
    Aug 1999
    Location
    Germany
    Posts
    2,338
    IMO the only way is to draw the items on your own. See here http://www.codeguru.com/Cpp/controls/combobox/, there are Multi-Col-Combo-boxes as well.

  3. #3
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    A ComboBox is a combination of two controls; one of which is a list box. I think you can do what you need to do by setting the list box to use tabs, but I don't know the details.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,883
    Originally posted by Sam Hobbs
    A ComboBox is a combination of two controls; one of which is a list box. I think you can do what you need to do by setting the list box to use tabs, but I don't know the details.
    The details are unfavorable. To use tabstops listbox must be created with LBS_USETABSTOPS. If it was not it successfully accepts style modification but it affects nothing - list appears to stay unaware of tabs.

    In the case of combo it creates the plain listbox. I didn't found out how to cheat it.
    Best regards,
    Igor

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center