Open In App

wxPython | create control tool using CreateTool() function

Last Updated : 16 Dec, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

In this function, we are going to learn how can we create a control tool using CreateTool() function. It is another version of CreateTool() function which only takes two parameters that is control and label. Let's see the parameters in detail.

Parameters : 

ParameterInput TypeDescription
controlwx.ControlThe control is to be added.
labelstringText to be displayed near the control.

Syntax:  

wx.ToolBar.CreateTool(self, control, label)

Code Example:  

Output : 
On starting Application: 

On clicking Button: 


 


Next Article
Article Tags :
Practice Tags :

Similar Reads