by convention, functions whose name starts with `is` are generally expected to return a boolean, and not to have any side effects.  This function looks like it doesn't return anything, and it does have side effects.  So I'd rename the function; maybe something like "updateTextboxVisibility", or... something.