Add 'xposition' Command to Menu WidgetsSchelte Bron$Revision: 1.4 $Tk
There has been a yposition subcommand for menu widgets for years, but its counterpart in the x-direction does not currently exist. This TIP intends to rectify that situation.
There is currently no way to obtain the x-position of a menu entry while a menu subcommand for obtaining the y-position does exist. Even though on a normal menu the x-position will always be 1, there are a few circumstances where the x-position may have some more interesting values. In particular, this is the case for menubars and for menus with column-breaks.
This TIP proposes a new subcommand for menu widgets, xposition, with the following syntax:
pathName xposition index
This returns an integer giving the x-coordinate within (i.e., relative to) the menu window specified by pathName of the leftmost pixel in the entry specified by index. The index may take any of the normal forms for identifying a menu entry.
Submitted to SourceForge as Patch #1152376. []
This document has been placed in the public domain.