wxPython - SetTextColour() function in wx.MenuItem Last Updated : 24 Feb, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn about SetTextColour() function associated with wx.MenuItem class of wxPython. SetTextColour() function is used to simply set the text colour associated with the menu item. Only a colour parameter is required in SetTextColour() function. Syntax: wx.MenuItem.GetTextColour(self) Parameters: Parameter Input Type Description colour wx.Colour colour for the text of menu item. Code Example: Python3 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.menubar = wx.MenuBar() self.fileMenu = wx.Menu() self.item = wx.MenuItem(self.fileMenu, 1, '&Check', helpString ="Check Help") self.item.SetBitmap(wx.Bitmap('right.png')) # SET BLUE COLOUR FOR TEXT FORMAT(R, B, G, A) self.item.SetTextColour((79, 81, 230, 255)) self.fileMenu.Append(self.item) self.menubar.Append(self.fileMenu, '&File') self.SetMenuBar(self.menubar) self.SetSize((350, 250)) self.SetTitle('Icons and shortcuts') self.Centre() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output: Comment More infoAdvertise with us Next Article wxPython - SetMenu() function in wx.MenuItem R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Practice Tags : python Similar Reads wxPython - SetMenu() function in wx.MenuItem In this article we are going to learn about SetMenu() function associated with wx.MenuItem class of wxPython. SetMenu() function sets the parent menu which will contain this menu item. It takes a single wx.Menu object as parameter. Syntax: wx.MenuItem.SetMenu(self, menu) Parameters: Parameter Input 1 min read wxPython - SetHelp() function in wx.MenuItem In this article we are going to learn about SetHelp() function associated with wx.MenuItem class of wxPython. SetHelp() function is simply used to set the help string associated with menu item. SetHelp() function only takes helpstring as a parameter. Syntax: wx.MenuItem.SetHelp(self, helpString) Par 1 min read wxPython - SetFont() function in wx.MenuItem In this article we are going to learn about SetFont() function associated with wx.MenuItem class of wxPython. SetFont() function is used to set the font associated with the menu item. It takes font as parameter which is wx.Font object. Syntax: wx.MenuItem.SetFont(self, font) Parameters: Parameter In 1 min read wxPython - SetBackgroundColour() function in wx.MenuItem In this article we are going to learn about SetBackgroundColour() function associated with wx.MenuItem class of wxPython. SetBackgroundColour() function simply sets the background colour associated with the menu item. No parameters are required in SetBackgroundColour() function. Syntax: wx.MenuItem. 1 min read wxPython - SetItemLabel() function in wx.MenuItem In this article we are going to learn about SetItemLabel() function associated with wx.MenuItem class of wxPython. SetItemLabel() function is used to set the label associated with the menu item in menu. Note that if the ID of this menu item corresponds to a stock ID, then it is not necessary to spec 1 min read wxPython - SetSubMenu() function in wx.MenuItem In this article we are going to learn about SetSubMenu() function associated with wx.MenuItem class of wxPython. SetSubMenu() is simply used to set the submenu of this menu item. It takes only one argument that is wx.Menu you want to add submenu for item. Syntax: wx.MenuItem.SetSubMenu(self, menu) P 1 min read Like