Thread: listbox Problem

  1. #1
    Registered User
    Join Date
    Apr 2010

    listbox Problem


    I've made my listbox is finally searched the item herraus which clicks the user.

    Unfortunately, this is written as a string, but now I need to compare again an integer.

    Here's my problem:

    // Get the currently selected item in the ListBox.
    String^ curItem = listBox1->SelectedItem->ToString();
    MessageBox::Show( curItem);  // SHOWS WHICH Item in the List is clicked
    if (curItem = 1)   if Number 1 is clicked my text will be visible
    this->richTextBox1->Visible = true;;
    hope you understand my problem with my poor english.

    I only want to know what is clicked to compare some if rules to show textboxed or hide them.

    hope you can help me.


  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    I don't understand your English or you code. Do you want this:
    if (curItem == "1")
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  3. #3
    Registered User
    Join Date
    Apr 2010
    oh my god...

    and i thought i need a integer to compare it.

    I dont thought that i can ask for a string with this "".


    i searched yesterday 4 h for this problem....

    so bad

    ty so mutch

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  2. Replies: 5
    Last Post: 11-07-2005, 10:34 PM
  3. Access a Listbox
    By cornholio in forum Windows Programming
    Replies: 1
    Last Post: 11-03-2005, 08:16 AM
  4. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  5. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM
Website Security Test