CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    problem in my Combobox


    well, I add strings to my combobox at the start up by using the AddString function but when I open the combobox, I see no content in it!!! That is very suprising....
    Does anyone have an idea?
    regards...



  2. #2

    Re: problem in my Combobox

    At combo box you have 2 things to set:
    a. the combo box size.
    b. the combo box list size (at the resources-> dialog box) press the little arrow at the combo box (at the right side) you'll see the combo box list size - try to enlarge it.

    if that does not work tell me please,
    Les.


  3. #3
    Join Date
    Jun 1999
    Location
    Toulouse - France
    Posts
    135

    Re: problem in my Combobox


    When i worked with combo boxes, i had some problem and like you sometimes i did'nt see the content of the combo box...

    What do you add to your combo box?
    Two ways:
    1- if you are created and added your character chain to the String table. (IDS_STRING1).

    nIndex = m_ComboTechno.AddString (CString((LPCSTR) IDS_STRING1 )) ;
    m_ComboTechno.SetItemData ( nIndex, IDS_STRING1 ); // Without SetItemData the string not appeared




    2- if you add a CString ou char* variable, AddString works

    nIndex = m_ComboTechno.AddString (CString(StrVar)) ; // char[30] StrVar
    or
    nIndex = m_ComboTechno.AddString (StrVar) ; // CString StrVar





    Send some code if it doesn't work

    HTH

    Sandrine



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