Suche Buttons wie unter Tk.

Plattformunabhängige GUIs mit wxWidgets.
Antworten
pyStyler
User
Beiträge: 311
Registriert: Montag 12. Juni 2006, 14:24

Donnerstag 8. März 2007, 15:56

Hallo,
gibt es unter wx auch so schönaussehende Buttons wie unter Tkinter? :D
beispiel:

Code: Alles auswählen

#!/usr/bin/env python
import Tkinter as tk

class tkApp(tk.Frame):
	def __init__(self, *args, **kw):
		apply(tk.Frame.__init__, (self,) + args, kw)
		self.parent = None
		if len(args) != 0:self.parent = args[0]
		self.widgets = {}
		self.widgets['tk.Button#1'] = tk.Button(self, text='Button')
		self.widgets['tk.Button#1'].grid(column=1, padx=1, pady=1, row=1, sticky='nsew')
		self.widgets['tk.Button#3'] = tk.Button(self,  text='Button')
		self.widgets['tk.Button#3'].grid(column=2, padx=1, pady=1, row=1, sticky='nsew')
		self.widgets['tk.Button#5'] = tk.Button(self,  text='Button')
		self.widgets['tk.Button#5'].grid(column=3, padx=1, pady=1, row=1, sticky='nsew')
		self.grid_rowconfigure(1, weight=1, minsize=30)
		self.grid_columnconfigure(1, weight=1, minsize=30)
		self.grid_columnconfigure(2, weight=1, minsize=30)
		self.grid_columnconfigure(3, weight=1, minsize=30)
def _main():
	root = tk.Tk()
	root.geometry('300x100')
	app = tkApp( root )
	app.pack(expand=tk.YES, fill=tk.BOTH)
	root.mainloop()
	
if __name__=='__main__':
	_main()
Danke&Gruss
pyStyler
Antworten