WxPython
Encyclopedia : W : WX : WXP : WxPython
- The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
Feature
The most important feature of wxPython, compared to Tkinter, is that it provides native-looking widgets to the program. On each of the platforms (operating systems) it runs, it utilized the widgets provided by the underlying system, thus make the program more similar to other programs on the same platform. On the other end, Tkinter provides a uniform outlook on all of the platforms it run because it draws its widgets by the graphics facilities.Example
import wx
- -*- coding: utf-8 -*-
class TestFrame(wx.Frame):
def (self, parent, ID, title): wx.Frame.(self, parent, -1, title, pos=(0, 0), size=(320, 240)) panel = wx.Panel(self, -1) text = wx.StaticText(panel, -1, "Test", wx.Point(10, 5), wx.Size(-1, -1))class TestApp(wx.App):def OnInit(self): frame = TestFrame(None, -1, "Hello, world!") self.SetTopWindow(frame) frame.Show(True) return Trueif == '':app = TestApp(0) app.MainLoop()
External links
- redirect
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
