Retrieve container/widget dimensions (width and height) programmatically?

Retrieve container/widget dimensions (width and height) programmatically ? Is it at all possible? kind regards; Piotr