Checkbox is not working

My settings are exactly the same in my new project, so it is pretty unlikely that this could do something :thinking:

Can you try to add the following after you add the Widget to the Viewport?

I don’ think it will change anything but it is worth a try :smiley:

1 Like

The only time I can replicate this (that the clicking on the CheckBox is not working) is when I bind the CheckedState to a Value or a Function.
But when this is happening I can’t set it with “SetCheckedState”, so this is also a dead end.

You could also Right Click the Widget in the Content Browser, and under “Asset Actions” use the “Validate Assets” button.
But that also doesn’t affect anything, because you’ve recreated the checkbox in a new widget and the error is still there (in the new one as well).

Sorry for any spelling mistakes :bowing_man:

For some reason, it works only for the top checkbox that was added in the second widget
But it doesn’t work if this logic on event tick is working for the first widget


Probably it is connected with some logic inside my first widget or something else, because on the early stages I hide the mouse cursor (somehow, can’t find where)

You actually don’t need to run this in the Event Tick.
It is enough when you run that at Begin Play :+1:

Can you show me a screenshot of your Event Tick from the first widget?

I used event tick to check the boolean in runtime to hide the cursor when mouse outside the button but this was probably a mistake
This is from the first widget, in this case, both checkboxes are not working


In this case, the second one is working

Yeah, to run that in the Event Tick is actually the problem.
It does something I don’t like, doesn’t even let me close my Window ^^

Can I ask what you try to achieve with the Check Box?
Maybe I can help you with a short example on how to implement it, so that this is not happening again :smiley:
Of course this is optional ^^

But in case if you still want to use the method in the Event Tick you can just check if your Variable “IsShowCursorOn” is not equal to the “ShowMouseCursor” Variable from the PlayerController.

So it will only execute the code when it changed :+1:

Example here:

(The “ShowCursor” Bool is my Variable, In your Widget it would be “IsShowCursorOn”)

1 Like

With your logic and deleting this, the first checkbox is now working


Thanks a lot for your help!
Will try this

1 Like

That’s great!

I would probably still use a check if your own Variable “IsShowCursorOn” is not the same as the “ShowMouseController” from the Player Controller, so it actually only executes the code when the bool changed :smiley:

1 Like

No problem!
Glad I could help and have fun continuing your work :smiley:

@Yaklakootmaa2 I would also change this do the right answer, due to it being the thing that solved the error :smiley:

This is the answer: Checkbox is not working - #27 by Hibiikiii

1 Like