# Can TkLabels Be Mouse-Click-Wise "Underneath" TkcRectangles?

**URL:** <https://www.ruby-forum.com/t/can-tklabels-be-mouse-click-wise-underneath-tkcrectangles/55932>\
**Category:** Ruby-Forum\
**Created:** [March 25, 2006, 2:51pm UTC](https://www.ruby-forum.com/t/can-tklabels-be-mouse-click-wise-underneath-tkcrectangles/55932 "2006-03-25T14:51:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [March 25, 2006, 2:51pm UTC](https://www.ruby-forum.com/t/can-tklabels-be-mouse-click-wise-underneath-tkcrectangles/55932/1 "2006-03-25T14:51:29Z")

</div>

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?
