By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,932 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,932 IT Pros & Developers. It's quick & easy.

How to select an item in a comboBox?

P: 20
hi.,

User will select an item from a comboBox.
Example:
Selection 1 : Quadratic
Selection 2: Trigonometri

Im not sure how do i recognize which selection has been made by the user in my code. Help!

Expand|Select|Wrap|Line Numbers
  1. if self._comboBox1.SelectedItem  :
  2.  
  3.         else:
  4.             MessageBox.Show(
  5.                         "Please Choose a Topic"
  6.                     )
  7.  
Oct 1 '10 #1
Share this Question
Share on Google+
3 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
What GUI toolbox are you using? In Tkinter, you initialize a variable, pass the variable to the widget constructor and use the set() and get() methods of the variable to access the value.
Oct 1 '10 #2

Expert 100+
P: 621
Take a look at the second post on this entry on this forum http://bytes.com/topic/python/answer...bobox-combobox
Oct 1 '10 #3

P: 20
Im using SharpDevelop.
Oct 1 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.