Print Page | Close Window

Verbs area too small

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=19642
Printed Date: 12 December 2024 at 9:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Verbs area too small
Posted By: vjedlicka
Subject: Verbs area too small
Date Posted: 06 April 2012 at 1:46pm
I added two verbs to the property grid, but the height of the verbs area is just one line, so the second verb is not visible. Is it possible to recalculate and resize the verbs area so all verbs are visible?



-------------
Thank you
Vaclav
---------------------
ToolkitPro 20.1.0
VS2010-2022, Windows 11



Replies:
Posted By: Oleg
Date Posted: 16 April 2012 at 9:21am
there SetVerbsHeight method, or check of it do in GuiVisualStudio sample.
 
void CPaneToolbars::RecalcLayout()
{
 CXTPClientRect rc(this);
 CSize sz(0);
 if (m_wndToolBar.GetSafeHwnd())
 {
  sz = m_wndToolBar.CalcDockingLayout(rc.Width(), /*LM_HIDEWRAP|*/ LM_HORZDOCK|LM_HORZ | LM_COMMIT);
  m_wndToolBar.MoveWindow(0, 0, rc.Width(), sz.cy);
  m_wndToolBar.Invalidate(FALSE);
 }
 int nVerbsHeight = 0;
 if (m_wndPropertyGrid.GetSafeHwnd() && m_wndPropertyGrid.GetVerbs()->GetCount() > 0)
 {
  nVerbsHeight = 50;
  m_wndPropertyGrid.ShowWindow(SW_SHOWNOACTIVATE);
  m_wndPropertyGrid.MoveWindow(0, rc.Height() - nVerbsHeight + 3, rc.Width(), nVerbsHeight - 3);
 }
 else if (m_wndPropertyGrid.GetSafeHwnd())
 {
  m_wndPropertyGrid.ShowWindow(SW_HIDE);
 }
 if (m_wndTreeCtrl.GetSafeHwnd())
 {
  m_wndTreeCtrl.MoveWindow(0, sz.cy, rc.Width(), rc.Height() - nVerbsHeight - sz.cy);
 }
}


Posted By: vjedlicka
Date Posted: 16 April 2012 at 11:01am
SetVerbsHeight() works fine
Thanks Thumbs Up


-------------
Thank you
Vaclav
---------------------
ToolkitPro 20.1.0
VS2010-2022, Windows 11



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