Change Active Widget Index of Widget Switcher?

Hello, I am doing this when “C” is pressed:

This “GetActiveWidget” function returns the correct index but on screen another widget index is being shown. How do I go about doing it right?