Opentopia Directory Encyclopedia Tools

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].
wxPython is an implementation of the wxWidgets GUI API (often referred to as a 'toolkit') for the Python programming language. It is meant as an alternative to Tkinter, which is an implementation of the Tcl based Tk API.

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

  1. -*- coding: utf-8 -*-
import wx

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 True
if == '':
app = TestApp(0)
app.MainLoop()

External links

  1. 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.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: