StablexUI icon indicating copy to clipboard operation
StablexUI copied to clipboard

Checkboxes only change state when label is clicked

Open RudolfVonKrugstein opened this issue 10 years ago • 4 comments

it seems to me, that checkboxes (state buttons in general) only change there state when I click on the label, not when I click on the remaining button.

That behavior is different to normal buttons. I did not find the code part that is responsible, but I am wondering why this behavior is the way it is, because I think it should be changed.

RudolfVonKrugstein avatar Jan 26 '15 11:01 RudolfVonKrugstein

There is nod specific code for such behavior. They should act like normal buttons in terms of mouse interactions. Is it the case for all targets or just for some of them?

RealyUniqueName avatar Jan 26 '15 12:01 RealyUniqueName

I test it on flash and linux64, and it happens on both targets.

It is interesting. In my skin I detect if a button is pressed by using the "pressed" attribte (drawing it differently if it is). So a checkbox gets pressed when I click on it anywhere. But when I relase the mouse, it only changes its state if the click was on the label.

RudolfVonKrugstein avatar Jan 26 '15 12:01 RudolfVonKrugstein

If I comment out the line

        //this.mouseChildren = true;

in the constructor of Checkbox, it works ...

RudolfVonKrugstein avatar Jan 26 '15 23:01 RudolfVonKrugstein

Whithout that line checkboxes withound background won't be clickable

RealyUniqueName avatar Jan 26 '15 23:01 RealyUniqueName