Print Page | Close Window

Resizing Property Grid

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=2834
Printed Date: 24 November 2024 at 8:12pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Resizing Property Grid
Posted By: MLatimer
Subject: Resizing Property Grid
Date Posted: 02 September 2005 at 3:14am
We are creating the property grid in the a CXTResizeDialog as you do in the samples. Namely:

OnInitDialog:

    SetResize(IDC_PROPERTY_GRID, SZ_TOP_LEFT, SZ_BOTTOM_RIGHT);

    // get the size of the place holder, this will be used when creating the grid.
    CRect rc;
    m_wndPlaceHolder.GetWindowRect( &rc );
    ScreenToClient( &rc );

    // create the property grid.
    if ( m_wndPropertyGrid.Create( rc, this, IDC_PROPERTY_GRID ) )

But when the dialog resizes, the property grid does not.

What actions should we take where to resize the property gid



Replies:
Posted By: Barto
Date Posted: 02 September 2005 at 3:52am

my code looks like this and works fine:

BOOL CKeyboardDlg::OnInitDialog()
{
 CXTResizeDialog::OnInitDialog();

 CKeyboard::Backup();

 // get the size of the place holder, this will be used when creating the grid.
 CRect rc;
 GetDlgItem(IDC_GRID)->GetWindowRect( &rc );
 ScreenToClient( &rc );

 GetDlgItem(IDC_GRID)->DestroyWindow();

 // create the property grid.
 m_wndPropertyGrid.Create(rc, this, IDC_GRID);
 m_wndPropertyGrid.SetTheme(xtpGridThemeWhidbey);
 m_wndPropertyGrid.ShowHelp(FALSE);
 m_wndPropertyGrid.SetViewDivider(.4);

 FillGrid();

 SetResize(IDC_GRID,    SZ_TOP_LEFT,  SZ_BOTTOM_RIGHT);
 SetResize(IDOK,      &nb sp; SZ_TOP_RIGHT, SZ_TOP_RIGHT);
 SetResize(IDCANCEL,    SZ_TOP_RIGHT, SZ_TOP_RIGHT);
 SetResize(IDC_DEFAULT, SZ_TOP_RIGHT, SZ_TOP_RIGHT);

 // Load window placement
 AutoLoadPlacement(_T("CKeyboardDlg"));
 
 return TRUE;
}

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net