Forum: Ruby-Forum.com Can TkLabels Be Mouse-Click-Wise "Underneath" TkcRectangles?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Efe70cff891d5722448a6512cfd1e1f1?d=identicon&s=25 David Bailey (dbailey7)
on 2006-03-25 14:51
Well, "the beat goes on", but I now have another problem.  In my sudoku
program, I track which cell has been clicked-in by grabbing the (X,Y)
coords of the mouse-click and then calculating the location of which of
the 81 TkcRectngles it is.  That, as they say, is "all good".

The "problem" is that when I display my text "digits" as TkLabels over
top of the sudoku cells as TkcRectangles, the (X,Y) coords are that of
the TkLabel and not the TkcRectangle.  That screws up my whole scheme
for locating the sudoku cell.

So I need the TkLabels to be visually on top of, but "mouse-click-wise"
on a plane that is "underneath" the TkcRectangle.  Is this possible?  If
not, I'm going to have to tell my sudoku players: "Um, click in the cell
but not actually on the displayed digits.  Uh, get used to clicking in
two zones: any where in the cell when there is no digit displayed in it,
or anywhere in the cell except actually on the digit when there is one
displayed."

That will be totally crappy.  Wouldn't you agree?

P.S.  I can't find any documentation on TkcRectangles, so I don't know
if they can have text options or not.  If they can, then I can use these
instead of TkLabels and my problem would be solved.  Anyone know if this
can be done?  If TkcRectangle can take a -text option?
This topic is locked and can not be replied to.