Improvements to tree widget tester.

This commit is contained in:
hyatt%netscape.com 1998-12-03 19:13:53 +00:00
Родитель 7d88c06920
Коммит a2b281b6c6
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -753,7 +753,7 @@ HandleTreeWindowEvent(nsGUIEvent *aEvent)
if (NS_OK == pTree->QueryInterface(kIWidgetIID, (void**)&widget))
{
nsRect r;
aEvent->widget->GetBounds(r);
aEvent->widget->GetClientBounds(r);
widget->Resize(0, 0, r.width, r.height, PR_TRUE);
NS_IF_RELEASE(widget);
}
@ -783,9 +783,12 @@ nsBrowserWindow::DoTreeView()
pTreeWindow->Create((nsIWidget*)NULL, r, HandleTreeWindowEvent,
nsnull, mAppShell, nsnull, &initData);
pTreeWindow->SetTitle("Tree Widget Tester");
// Create and place a tree view.
r = nsRect(0,0,300,300);
pTreeWindow->GetClientBounds(r);
r = nsRect(0,0,r.width,r.height);
rv = nsRepository::CreateInstance(kCTreeViewCID, nsnull, kITreeViewIID,
(void**)&mTreeView);