Set text field size attribute dynamically

how can i set the text fields size dynamically?

actually i created a text field dynamically by using createTextField
but i am not able to set the text size and also its background color…
ca nybody help me…