Python - wxpython INSTALLATION














































Python - wxpython INSTALLATION




Wxpython installation:

Install Using this:       

 pip install wxpython


Code to Print a message on Screen: 

Algorithm:

Creating GUI and showing a message on window using wxpython:

    1. import wx module.
    2. Create an object for application class.
    3. Create an object for frame class.
    4. Pass the object of frame in the object of Panel class.
    5. Then add a Static text object to show Your Message .
    6. Show the frame window by calling show method with frame object.
    7. Run the app till the window is closed by using main event loop application object.


CODE:

   import wx

app1 = wx.App()

frame = wx.Frame(None, title="CPP")

pa = wx.Panel(frame)

text1 = wx.StaticText(pa, label="CPP SECRETS", pos =(150, 70))

frame.Show()

app1.MainLoop()


OUTPUT:



.....












Comments