Setsize before adding canvas