Joy,
You can't use a standard widget development workflow to accomplish what you are after then. You would have to develop an off panel widget like the OTB Scalebar widget or coordinate widget. There is no sample/example of a widget that is specifically what you are attempting to do. So you can only use one of the off panel widgets as a starting point.