Results 1 to 6 of 6
  1. #1
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused

    Question [Help]ComboBox Selections[Solved]

    ComboBox1
    Code:
    M16A4
    AK47
    M4 Carbine
    G3
    G36C
    M14
    MP44
    ComboBox2
    Code:
    ACOG Scope
    Red Dot Sight
    Silencer
    Grip
    Rifle Gernades
    Ok this is what I am trying to make. If AK47 is selected in combox1 then:

    Code:
    ComboBox1= AK47
    Code:
    Combox2 = ACOG Scope
    Red Dot Sight
    Silencer
    Grip
    so everything except the rifle gernades.
    How do this?

    Is it like:
    Code:
    If ComboBox1.Text = "AK47" Then
    ComboBox2.Items = "ACOG Scope,Red Dot Sight,Silencer,Grip"
    If so how would i do it?

  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    In the Combo Box Item Change event (there is one, double click the combo box)

    [php]
    If comx1.selecteditem (' or is it selected") = "what you want to check it against here" Then
    Comx2.selecteditem = "this that and the other thing
    end if
    [/php]


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    i dont think i explained it correctly.
    so when i select AK47.

    I want the items in ComboBox2 to be:
    ACOG Scope
    Red Dot Sight
    Silencer
    Grip
    'since a rifle grenade cannot be attached to an AK47.

    so how do i remove rifle grenade from the from the comx list?

  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    To add an item it is

    [php]
    Comx1.items.add("Item To Add")
    [/php]

    To Remove an Item it is

    [php]
    Comx1.items.remove("Item To Remove")
    [/php]


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #5
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    How do you remove all items from the combolist?

  6. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Code:
    ComboBox1.Items.Clear()



Similar Threads

  1. [Help Request] Help me to solve this ? :#
    By josias008 in forum Combat Arms Help
    Replies: 9
    Last Post: 08-06-2011, 12:05 AM
  2. [Help] WMP selecting song from ListBox [solved]
    By alvaritos in forum Visual Basic Programming
    Replies: 10
    Last Post: 04-13-2011, 03:23 PM
  3. [Help]ListBox.Item.Selected[Solved]
    By hopefordope in forum Visual Basic Programming
    Replies: 6
    Last Post: 04-21-2010, 08:32 AM
  4. [Help]ComboBox Selection[Solved]
    By Invidus in forum Visual Basic Programming
    Replies: 12
    Last Post: 04-01-2010, 10:40 AM
  5. [Help]random selections ComboBox
    By ppl2pass in forum Visual Basic Programming
    Replies: 4
    Last Post: 03-17-2010, 03:02 PM