1

Is it possible to change the size of the treeview window after it has been visualized?

My code looks like this:

    _p2DNavViewer = NULL;       
    _p2DNavViewer = new CATNavigation2DViewer(this, "", CATDlgFraNoTitle | CATDlgWndNoDecoration |CATDlgWndChildMDI |CATDlgFraNoFrame, _width, _height);


    _pNavigBox = new CATNavigBox(this, "", NULL, Indented, "CATINavigateObject_ForCAA2", 0, 0, _p2DNavViewer);

this is the surrounding CATDlgContainer.

I can't find anything that would indicate that it's possible, but CATIA is doing it so there has to be a way. I'm using CAAV5 R16.

Radogost
  • 143
  • 5
  • 16
Alexander Stolz
  • 7,454
  • 12
  • 57
  • 64

1 Answers1

1

I'm catching a Resizecallback from the CATDlgContainer

AddAnalyseNotificationCB(this,this->GetResizeNotification(), 
    (CATCommandMethod)&PROTrvTreeView::OnContainerResizeNotification,
    NULL);

The catching method looks like this:

void PROTrvTreeView::OnContainerResizeNotification(CATCommand* cmd, 
                  CATNotification* evt, CATCommandClientData data) {
    DRECT * pRect = new DRECT();
    GetRectDimensions(pRect);
    if (pRect != NULL) {
        _p2DNavViewer->SetRectDimensions(pRect->x,pRect->y, pRect->dy, pRect->dx);
    }
    delete pRect;
    pRect = NULL;
}

So it was _p2DNavViewer->SetRectDimensions all along.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
Alexander Stolz
  • 7,454
  • 12
  • 57
  • 64