wx.ColourDisplay() function in wxPython
Last Updated :
20 Apr, 2021
In this article we are going to learn about ColourDisplay() method in wxPython. ColourDisplay() function is an inbuilt function present in wxPython. code>ColourDisplay() function is simply used to determine whether the display we are using is colour display or not. ColourDisplay() function returns True if the display is colour, False otherwise.
Syntax:
wx.ColourDisplay()
Parameters:
ColourDisplay() function requires no arguments.
Return Type:
bool
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 ):
if (wx.ColourDisplay() = = True ):
print ( "Display is Colour Display" )
else :
print ( "Display is not Colour Display" )
def main():
app = wx.App()
ex = Example( None )
ex.Show()
app.MainLoop()
if __name__ = = '__main__' :
main()
|
Output:
Display is Colour Display
Share your thoughts in the comments
Please Login to comment...