wxPython - Change Cursor image on StaticText Last Updated : 18 Jun, 2020 Comments Improve Suggest changes Like Article Like Report In this article we will learn how can we change cursor image when cursor hovers over the static text. We can do it by creating a cursor object and using SetCursor() function associated with wx.StaticText class of wxPython. SetCursor() takes wx.Cursor object as a parameter. Syntax: wx.StaticText.SetCursor(cursor) Parameters: Parameter Input Type Description cursor wx.Cursor cursor to be set. 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) self.pnl = wx.Panel(self) bmp = wx.Bitmap('right.png') # CREATE STATICTEXT AT POINT (20, 20) self.st = wx.StaticText(self.pnl, id = 1, label ="This is the Label.", pos =(20, 20), size = wx.DefaultSize, style = wx.ST_ELLIPSIZE_MIDDLE, name ="statictext") # CREATE CURSOR OBJECT c = wx.Cursor(wx.Image('right.png')) # SET c AS CURSOR self.st.SetCursor(c) 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 - Change Cursor image on StaticText R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-StaticText Practice Tags : python Similar Reads wxPython - Change Font of StaticText In this article we are going to learn how can we change the font of static text present on the window. To do this first of all, we will create a wx.Font class of wxPython. After this we will use SetFont() function of wx.StaticText class. SetFont() function takes a sing wx.Font type parameter. Syntax 1 min read wxPython - Change cursor for ToolBar In this article will learn how can we change the cursor to a custom image cursor when it hovers over the toolbar. To do this we need to follow some steps as follows. Step 1: Create wx.Image object of the image you like. Step 2: Create wx.Cursor object passing image as parameter. Step 3: Set cursor f 1 min read wxPython - CaptureMouse() in wx.StaticText Python provides wxpython package which allows us to create high functional graphical user interface. It is cross platform GUI toolkit for python, Phoenix version Phoenix is the improved next-generation wxPython and it mainly focused on speed, maintainability and extensibility. In this article, we w 2 min read wxPython - Create() function in wx.StaticText In this article we are going to learn about Create() associated with wx.StaticText class of wxPython. A static text control displays one or more lines of read-only text. Create() function is used for two step creation of static text. It takes attributes of statictext as arguments. Syntax: wx.StaticT 1 min read wxPython - Change Cursor on hover on Button In this article we will learn that how can we change cursor when it hovers on Button present in frame. We need to follow some steps as followed. Step 1- Create a wx.Image object with image you want to use as cursor image. Step 2- Create a wx.Cursor object and pass wx.Image object above created. Step 1 min read Like