Lines Matching refs:combo
117 self.combo = ttk.Combobox()
120 self.combo.destroy()
124 width = self.combo.winfo_width()
125 self.combo.event_generate('<ButtonPress-1>', x=width - 5, y=5)
126 self.combo.event_generate('<ButtonRelease-1>', x=width - 5, y=5)
127 self.combo.update_idletasks()
133 self.combo['values'] = [1]
134 self.combo.bind('<<ComboboxSelected>>',
136 self.combo.pack()
137 self.combo.wait_visibility()
139 height = self.combo.winfo_height()
141 self.combo.update()
142 self.combo.event_generate('<Return>')
143 self.combo.update()
151 self.combo['postcommand'] = lambda: success.append(True)
152 self.combo.pack()
153 self.combo.wait_visibility()
159 self.combo['postcommand'] = ''
166 self.assertEqual(self.combo.get(), getval)
167 self.assertEqual(self.combo.current(), currval)
171 self.combo['values'] = ['a', 1, 'c']
173 self.combo.set('c')
176 self.combo.current(0)
179 self.combo.set('d')
183 self.combo.set('')
184 self.combo['values'] = (1, 2, '', 3)
188 self.combo.configure(values=[1, '', 2])
189 self.assertEqual(self.combo['values'], ('1', '', '2'))
192 self.combo['values'] = ['a b', 'a\tb', 'a\nb']
193 self.assertEqual(self.combo['values'], ('a b', 'a\tb', 'a\nb'))
196 self.combo['values'] = [r'a\tb', '"a"', '} {']
197 self.assertEqual(self.combo['values'], (r'a\tb', '"a"', '} {'))
200 self.assertRaises(Tkinter.TclError, self.combo.current,
201 len(self.combo['values']))
203 self.assertRaises(Tkinter.TclError, self.combo.current, '')