wxPython - SetBitmapPosition() function in wx.Button Last Updated : 26 Jun, 2020 Comments Improve Suggest changes Like Article Like Report In this article we are going to learn about SetBitmapPosition() function associated with wx.Button class of wxPython. SetBitmapPosition() function is used to set the direction of bitmap where you want to set. Directions: 1. wx.LEFT 2. wx.RIGHT 3. wx.BOTTOM 3. wx.TOP Syntax: wx.Button.SetBitmapPosition(self, dir) Parameters: Parameter Input Type Description dir Direction Direction in which the bitmap should be positioned, one of wx.LEFT, wx.RIGHT, wx.TOP or wx.BOTTOM. Code Example: Python3 1== import wx class Example(wx.Frame): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): self.locale = wx.Locale(wx.LANGUAGE_ENGLISH) # create parent panel for button self.pnl = wx.Panel(self) # create bitmap bmp = wx.Bitmap('pointer.png') # create button at point (20, 20) self.st = wx.Button(self.pnl, id = 1, label ="Button", pos =(20, 20), size =(300, 40), name ="button") # set bitmap for button self.st.SetBitmap(bmp) # change position of bitmap to right self.st.SetBitmapPosition(wx.RIGHT) self.SetSize((350, 250)) self.SetTitle('wx.Button') self.Centre() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output Window: Comment More infoAdvertise with us Next Article wxPython - SetBitmapPosition() function in wx.Button R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - GetBitmap() function in wx.Button In this article we are going to learn about GetBitmap() function associated with wx.Button class of wxPython. GetBitmap() function is simply used to return the bitmap shown by the button. The returned bitmap may be invalid only if the button doesnât show any images Syntax: wx.Button.GetBitmap(self) 1 min read wxPython - SetDefault() function in wx.Button In this article we are going to learn about SetDefault() function associated with the wx.Button class of wxPython. This sets the button to be the default item in its top-level window (e.g. the panel or the dialog box containing it). As normal, pressing return causes the default button to be depresse 1 min read wxPython - SetLabel() function in wx.Button In this article we are going to learn about SetLabel() function associated with wx.Button class of wxPython. SetLabel() function is used to set the string label for the button. It takes a string parameter that is used as label for button. Syntax: wx.Button.SetLabel(self, label) Parameters: Parameter 1 min read wxPython - SetAuthNeeded() function in wx.Button In this article we are going to learn about SetAuthNeeded() function associated with wx.Button class of wxPython. SetAuthNeeded() function is used to set whether an authentication needed symbol should be displayed on the button. It takes only boolean argument, that is, needed or not. Syntax: wx.Butt 1 min read wxPython - SetBitmap() function in wxPython In this article we are going we are going to learn about SetBitmap() function associated with wx.MenuItem class of wxPython. SetBitmap() sets the bitmap for the menu item. SetBitmap must be called before the item is appended to the menu, i.e. appending the item without a bitmap and setting one later 1 min read Like