Patent ID: 7730418

Claim:
In a computing environment, a method for dynamically sizing a window based on the size of content that is being displayed within the window, wherein the content being displayed within the window is represented by elements in a tree of elements with a root element representing the window, the method comprising: providing at least two window states, said window states comprising: a first state in which a window is automatically resized when content within the window is changed; and a second state in which the window is not automatically resized when the content within the window is changed, wherein the window transitions from the first state to the second state when user input is received that manually alters the size of the window; while the window is in the first state: displaying the window with a size that is based on the content within the window; detecting a change in the size of a portion of the content within the window, wherein the portion of the window is contained within a child element of the window; obtaining size information from the child element, wherein the size information is based on the size of the portion of the content contained within the child element; adjusting a size parameter of the window based on the size information obtained from the child element; and resizing the window to the size parameter such that the display of the window is resized to fit the changed content; and after transitioning the window to the second state in response to receiving user input that manually alters the size of the window; detecting a change in the size of a portion of the content within the window; and abstaining from resizing the window such that the size of the window remains the same even though the portion of the content within the window has changed.