At Wed, 23 May 2012 16:44:12 -0700 (PDT) Silas <
sil...@gmail.com> wrote:
>
> On May 23, 7:57=A0pm, Will Duquette <
w...@wjduquette.com> wrote:
> > The text widget you're wrapping is still a [text] widget; so its
> > bindtags include Text, not Xtext. =A0Replace Text with Xtext in the
> > bindtags, and you should be good to go.
>
> Yes, it works as people told me on the chat. There is a little
> problem, though. When binding the widget, the %W substitution
> substitutes to the [text], not my megawidget (so I cannot use my
> megawidget methods). Should I use [winfo parent %W]? It looks ugly,
> but if it is the only way...
Don't put the tags on the 'inner' component widget, put it on the
container widget (usually a frame, but you can change that). If the
*only* component of your megawidget is the text widget, then you can
create a snit::widetadapter instead of a snit::widget and make the hull
the text widget itself.
>
> Thanks.
>
--
Robert Heller --
978-544-6933 /
hel...@deepsoft.com
Deepwoods Software --
http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\
www.asciiribbon.org -- against proprietary attachments