Resize depend on device resulation by new ui

I made it in unity by new ui system but when I tested it in my 10.1 tablet, I saw that my buttons dont resize depend on different screens. I know that I can set positions depend on resulation by Anchor vut I dont know how I can resize them in different resulation.

Use a canvas scaler, set it to scale with screen size and set match width or height to 1.

Where is canvas scaler my friend !!!

Select your game object with the canvas, then add a canvas scaler component.
http://docs.unity3d.com/Manual/script-CanvasScaler.html

I wonder I havent canvas scaler !!
I have canvas, canvas group, canvas renderer !!!
there isnt canvas scaler !!
Can u give me the script file ???

It is backup and update time!

Oh yes thanx my friend. You help me alot.

I updated my unity and used canvas scaler for my canvas game object and this is the result :
http://upload7.ir/uploads//388143c30684c2b90750624538069f97ddcb85ce.png

Canvas scaler just effected on image game objects not buttons !

Note : I generated buttons with code in start method.

Get it to work without generating it and then make sure to use those for the generation as well.

But i have to generate buttons by codes.

It is complex to get it right like that. So make one step back and get it working at all, such that you understand what settings are needed. When you got that, generate it by code.