/window -w2 is documented as 'show in the treebar' so it is not expected that it should remove the button from the switchbar.
Did you mean a different digit there? To remove the button from the switchbar you have to use /window -w0 "status window", but I just tried it and it didn't remove the button from my treebar in mIRC 7.64 so..
Not sure really but seems like you can't remove a status window's button from tree/switchbar indeed.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel