Bugs item #1119673, was opened at 2005-02-09 13:22
Message generated for change (Comment added) made by drewp
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119673&group_id=5470

Category: Tkinter
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Drew Perttula (drewp)
Assigned to: Martin v. Löwis (loewis)
Summary: ScrolledText allows Frame.bbox to hide Text.bbox

Initial Comment:
sys.version ==  '2.3.3a0 (#3, Jul 20 2004, 10:32:48)
\n[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.2)]'

from ScrolledText import ScrolledText
s = ScrolledText()
s.pack()

I wish to call bbox on the Text, but s.bbox is the
surrounding Frame's bbox, and the Text's bbox method is
lost. I suppose these lines from ScrolledText.py should
be expanded to include 'bbox', but I have not tested
such a fix:

            if m[0] != '_' and m != 'config' and m !=
'configure':
                setattr(self, m, getattr(self.frame, m))

For special situations (of which bbox is probably *not*
one), the Text methods should probably be available
under something like s.text.bbox().

----------------------------------------------------------------------

>Comment By: Drew Perttula (drewp)
Date: 2005-02-09 13:36

Message:
Logged In: YES 
user_id=127598

A workaround:

s = ScrolledText()
new.instancemethod(Text.bbox,s,s.__class__)(...)

but, I actually have a subclass of ScrolledText, and I can't
figure out how to use the workaround. 

class Foo(ScrolledText):
...  def foo(self):   
... ... new.instancemethod(tk.Text.bbox, self,
self.__class__)("insert")

TypeError: unbound method bbox() must be called with Text
instance as first argument (got Foo instance instead)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119673&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to