In this article we will see how we can set limit to the number of items in the combo box. When we create a combo box there is no limit set to the items we can add any number of items although sometimes condition arises to set the maximum limit to the items.
In order to set the maximum limit to the number of items we use
Syntax : combo_box.setMaxCount(n)
Argument : It takes integer as argument
Action performed : This will set maximum limit to the number of items in combo box
Below is the implementation –
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.