[Pythonmac-SIG] 2.3a2 and Tk 8.4 -- missing Buttons

bugs bugbee@seanet.com
Sun, 9 Mar 2003 23:45:19 -0800


--Apple-Mail-19-255642921
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Here is a minimalist program to demonstrate a problem of missing 
buttons when using Tkinter.  This and the parent program run just fine 
under Windows.

Can someone else confirm the problem?  ...and let me know where I 
should file the bug report.  Tk?  MacPython?

Thanks

Larry

	
--Apple-Mail-19-255642921
Content-Disposition: attachment
Content-Type: multipart/appledouble;
	boundary=Apple-Mail-20-255642921


--Apple-Mail-20-255642921
Content-Disposition: attachment;
	filename=noOKbtn.py
Content-Transfer-Encoding: base64
Content-Type: application/applefile;
	name="noOKbtn.py"

AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAJAAAAMgAAAAoAAAADAAAAPAAAAApURVhUZG9z
YQEAbm9PS2J0bi5weQ==

--Apple-Mail-20-255642921
Content-Disposition: attachment;
	filename=noOKbtn.py
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-setext;
	x-mac-creator=646F7361;
	x-unix-mode=0700;
	x-mac-type=54455854;
	name="noOKbtn.py"

#!/Library/Frameworks/Python.framework/Versions/2.3/bin/python=0D
=0D
"""=0D
	This is a minimalist program to demonstrate a problem with =
Tkinter not=0D
	painting all the widgets in a window, in this case, an OK =
button.  This =0D
	code works fine with Python 2.2.2 under Windows.=0D
	=0D
	Larry Bugbee=0D
	March 2003=0D
"""=0D
=0D
import os, sys, string=0D
from Tkinter import *=0D
=0D
=
#-------------------------------------------------------------------------=
------=0D
=0D
class TkDemo:=0D
=0D
	pgmname =3D 'noOKbtn'=0D
	=0D
	def __init__(self):=0D
		self.buildGUI()=0D
		self.root.mainloop()=0D
=0D
	def buildGUI(self):=0D
		root =3D Tk()=0D
		root.title(self.pgmname)=0D
		root.geometry('+200+100')		# screen =
location=0D
		pallet =3D Frame(root)=0D
		Label(pallet, text=3D'\nPlease click the Demo =
button.\n').pack(side=3DTOP)=0D
		button2 =3D Button(pallet, text=3D"Demo...", =
command=3Dself.showMsg, width=3D8)=0D
		button2.pack(side=3DLEFT,  padx=3D20, pady=3D10)=0D
		button5 =3D Button(pallet, text=3D'Quit',    =
command=3Droot.destroy, width=3D8)=0D
		button5.pack(side=3DRIGHT, padx=3D20, pady=3D10)=0D
		pallet.pack()=0D
		self.root =3D root=0D
=0D
	def showMsg(self):=0D
		msgtxt =3D 'No OK button?\nClick in resize (lower right) =
to  see it.'=0D
		msgDlg =3D Toplevel(self.root)=0D
		msgDlg.title('Message')=0D
		msgDlg.geometry('+190+100')		# screen =
location=0D
		msg =3D Label(msgDlg, text=3Dmsgtxt)=0D
		msg.pack(side=3DTOP, padx=3D20, pady=3D10)=0D
		btn =3D Button(msgDlg, text=3D'OK', =
command=3Dself.msgDlgOK, width=3D8)=0D
		btn.pack(side=3DBOTTOM, pady=3D10)=0D
#		btn.bind('<Key>', self.msgDlgOK)=0D
#		btn.focus_set()=0D
		self.msgDlg =3D msgDlg=0D
#		msgDlg.mainloop()=0D
		=0D
	def msgDlgOK(self, event=3DNone):=0D
		self.msgDlg.destroy()=0D
=0D
=
#-------------------------------------------------------------------------=
------=0D
=0D
#if __name__ =3D=3D '__main__':=0D
if 1:=0D
	# which version?  ...should there be multiple versions =
installed.=0D
	import sys=0D
	print '\nPython', sys.version=0D
	=0D
	import _tkinter=0D
	print 'Tk: ', float(_tkinter.TK_VERSION)=0D
	print 'Tcl:', float(_tkinter.TCL_VERSION)=0D
=0D
	print '\nsys.argv:', sys.argv=0D
	print '\nSearchlist:'=0D
	for i in sys.path:=0D
		print ' ', i=0D
	print '-'*80=0D
	=0D
	TkDemo()=0D
	=0D
=
#-------------------------------------------------------------------------=
------=0D
=
#-------------------------------------------------------------------------=
------=0D
=
#-------------------------------------------------------------------------=
------=0D

--Apple-Mail-20-255642921--

--Apple-Mail-19-255642921
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed




--Apple-Mail-19-255642921--