![]() 'entry matches the corresponding ListIndex valueĬomboBox1.AddItem "Left Top" 'ListIndex = 0ĬomboBox1.AddItem "Left Center" 'ListIndex = 1ĬomboBox1.AddItem "Left Bottom" 'ListIndex = 2ĬomboBox1.AddItem "Right Top" 'ListIndex = 3ĬomboBox1.AddItem "Right Center" 'ListIndex = 4ĬomboBox1.AddItem "Right Bottom" 'ListIndex = 5ĬomboBox1.AddItem "Above Left" 'ListIndex = 6ĬomboBox1.AddItem "Above Center" 'ListIndex = 7ĬomboBox1.AddItem "Above Right" 'ListIndex = 8ĬomboBox1.AddItem "Below Left" 'ListIndex = 9ĬomboBox1.AddItem "Below Center" 'ListIndex = 10ĬomboBox1.AddItem "Below Right" 'ListIndex = 11ĬomboBox1.AddItem "Centered" 'ListIndex = 12 Label1.Caption = "Select picture placement " _ To use this example, copy this sample code to the Declarations portion of a form. This code sample also uses the AddItem method to populate the ComboBox choices. ![]() ![]() Each time the user clicks a list choice, the picture and caption are updated on the CommandButton. The following example uses a ComboBox to show the picture placement options for a control.
0 Comments
Leave a Reply. |