Latest WME version: WME 1.9.1 (January 1st, 2010) - download
var win = Game.LoadWindow("interface\system\caption.window"); // Stores the window in the win variable.global WinCaption = win.GetWidget("caption");// stores the win entity/widget "caption" in the global varible.WinCaption.SizeToFit();// The important part. This resizes the control to fit the text size.