problem with rectangle label

 

I'm using rectangle label as background and have a button above, when I click the button the parameter return rectangle label not the button.

I set z_order of button to 10 but I still can't click the button.

Please help.

Thanks.

 

Have you tried OBJPROP_SELECTABLE as false for the label?

Just a suggestion, I don't know if it will solve your problem or not.

 
GumRai:

Have you tried OBJPROP_SELECTABLE as false for the label?

Just a suggestion, I don't know if it will solve your problem or not.

Yes I have. didn't work.
 
what about OBJPROP_ZORDER
 
qjol:
what about OBJPROP_ZORDER

He said " I set z_order of button to 10 but I still can't click the button. "

 

sorry i didn't notice

can you please show the relevant code (using SRC)

 
Yes. I think it is just common coding mistakes.
 
deysmacro:
Yes. I think it is just common coding mistakes.

So did the z_order ever work for you? It did not for me, but I haven't tried it recently.
 
I don't use zorder. How bout showing us your code? We can point to you where the culprit is.
 
deysmacro:
I don't use zorder. How bout showing us your code? We can point to you where the culprit is.

The problem is that the z-order does nothing and that the mouse event is caught by a different object than the one rendered on the top. Not sure, how you could read this from my code, you must try it and watch.
 

I never used z-order and never intend to since all my objects works according to my wish.


Instead of using button and rectangle, remove the rectangle and see if the click happens or not. Set the z-order to defaults while you at it.

And if you insist on using rectangle, the code for object rectangle must be before the code for object button. Not the other way round. That way, the terminal will draw rectangle first and then button on top of rectangle.


If you say it is not working, I will not say anything until the code of yours is here.

Reason: