set show custom menu in a function