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

Thread: Combo box help

  1. #1
    Join Date
    Sep 2011
    Posts
    0

    Exclamation Combo box help

    Can someone help me?

    I have a 3 options Combo Box on My Form.. and below it is Confirm and Cancel Command Button.
    I have organize 3 Frames Below.. ALL ARE INVISIBLE MODE..

    Here's i want to achieve, After the Selection1 from Combo Box, when user press the Command Button OK, frame1 will be visible.. and frame2 and 3 are still invisible..
    and when user select selection2, frame2 will be visible while 1 and 3 are invisible..

    Please HELP.. thanx..

    using VB6.0

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Combo box help

    something on the lines of:
    Code:
    Command1_Click()
      Frame1.Visible = (Combo1.Listindex = 0)
      Frame2.Visible = (Combo1.ListIndex = 1)
      Frame3.Visible = (Combo1.ListIndex = 2)
    End Sub
    I assume that yuo select from the items in the combo box. So the first item has the Index 0.
    Frame1 will be set visible when the listindex of the combobox is 0, in fact when the first item is selected, and so on.

Tags for this Thread

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