Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Verbs area too small
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Verbs area too small

 Post Reply Post Reply
Author
Message
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Topic: Verbs area too small
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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);
 }
}
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2012 at 11:01am
SetVerbsHeight() works fine
Thanks Thumbs Up
Thank you
Vaclav
---------------------
ToolkitPro 20.1.0
VS2010-2022, Windows 11
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.176 seconds.