Creating A Toolbar & Canvas Sketch

Thanks for your response. How can I specifically divide the window into two distinct parts using the constrain() function and if statements though? Where the drawing tool is constrained to canvas section, and the use of a button function