<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>According to the Tix documentation online, HList
has an info_bbox() method which returns the bounding box of a given item in the
HList. However, when I try to call this method, I get an attribute
error. Looking at Tix.py I see that info_bbox() is not
implemented.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hazarding a chance (mostly by looking at the other
method implementation) I see if I can define it myself.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>def info_bbox( self, entry ):</FONT></DIV>
<DIV><FONT face=Arial size=2> return [ int(pos) for pos in
self.tk.call( self._w, 'info', 'bbox', entry).split() ]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>When I use this implementation it works.
Why's info_bbox() been left out of HList?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I can't formulate a work-around for what I'm trying
to do. I need info_bbox().</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here's why:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm currently working on a project which involves
some fairly complex GUIs. It displays data in the form of an outline which
the user can edit, it also generates web pages. To allow a
natural feel to editing the order of the items in the outline, I decided to make
use of the Tkinter drag and drop module: Tkdnd. To do this correctly, I
need to do a bit of arithmetic with screen coordinates while in a drag
operation (so I can change the cursor during the drag) so that I can
determine if my current drag position (potential drop position) is above,
below or as a child of some other item in the outline. The easiest way to
do this is to get the bounding box of the nearest items.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Ron</FONT></DIV></BODY></HTML>