Open In App

wxPython - Create() function in wx.Button

Last Updated : 01 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article we are going to learn about Create() function associated with wx.Button class of wxPython. Create() function is used for button creation function for two-step creation. It takes attributes of a button as arguments.

Syntax: wx.Button.Create(self, parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ButtonNameStr) Parameters:

ParameterInput TypeDescription
parentwx.WindowParent window. Should not be None.
idwx.WindowIDControl identifier. A value of -1 denotes a default value.
labelstringText Label.
poswx.PointWindow position.
sizewx.WindowWindow size.
stylelongWindow style.
validatorwx.ValidatorWindow validator.
namestringWindow name.

Return Type: bool

Code Example: 

Output Window:


Next Article

Similar Reads