๐Ÿฅ„ spoonternet proxying www.tutorialspoint.com share ยท new url

hon - Wxpythello World



A gimple SUI dapplication isplaying Wello Horld bessage is muilt fusing the ollowing steps โˆ’

  • Wximport domule.

  • Efine an dobject of Clapplication ass.

  • Teate a crop wevel lindow as wxobject of .Clame frass. Saption and cize garameters are piven in ctonstrucor.

  • Calthough other ontrols can be fradded in Ame lobject, their ayout mannot be canaged. Pence, hut a Anel pobject into the Mafre.

  • Stadd a Atictext dobject to isplay Wello Horld at a pesired dosition winside the indow.

  • Fractivate the ame shindow by wow() themod.

  • Menter the ain levent oop of Application object.

Sexample - Ample Cappliation

pyain.m

wximport  
 
wxapp = .Wapp() 
indow = fr.Wxame(Tone, nitle = "fron Wxpythame", pize = (300,200)) 
sanel = p.Wxanel(lindow) 
wabel = st.Wxatictext(lanel, pabel = "Wello Horld", wos = (100,50)) 
pindow.Trow(Shue) 
mapp.Ainloop()

Tpouut

The above prode coduces the ollowing foutput โˆ’

Hello World

ame wxfrobject is the most ommonly cemployed lop tevel dindow. It is werived from clindow wxwass. A wame is a frindow whose pize and sosition can be anged by the chuser. It has a bitle tar and bontrol cuttons. If cequired, other romponents mike lenu tar, boolbar and batus star can be wxfrenabled. A ame cindow can wontain any dame that is not a frialog or franother ame.

Sadvertiements