Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Property grid, resizing Collapse All
Subject Author Date
a a Jun 22, 2006 - 10:56 PM

Hi.

I would like to use the property grid on a View.
It appears that when the view is resized, the property grid is not redrawn correctly even though I invalidate it after resizing.

This is the current work-around code I’m using inside the resize event of the view:
--
if( ::IsWindow( m_PropertyGrid.m_hWnd ) )
{
m_PropertyGrid.MoveWindow( 0, 0, cx, cy );
m_PropertyGrid.RetrieveComboBoxBar()->Invalidate();
m_PropertyGrid.RetrieveTipBar()->Invalidate();
m_PropertyGrid.RetrieveGridWindow()->Invalidate();
m_PropertyGrid.RetrieveToolBar()->Invalidate();
}
--

Retrieve* methods are shorthands. I’m invalidating each part of the control programatically...

Do you know where this is coming from?
Is there a clean way to do this?

Thanks.

a a Jun 23, 2006 - 12:45 AM

The following code seems to work:

if (::IsWindow(m_PropertyGrid.m_hWnd))
{
m_PropertyGrid.MoveWindow(0, 0, cx, cy);
m_PropertyGrid.UpdateWindow();
}

Is this correct?

Technical Support Jun 23, 2006 - 11:05 AM

This code is correct but moving the property grid window should be enough to see its contents resized and repainted correctly. We can review your project and find out what’s wrong with the property grid repainting after it is resized.