Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGrid  NavigateItems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGrid NavigateItems

 Post Reply Post Reply
Author
Message
cartney View Drop Down
Newbie
Newbie


Joined: 05 July 2010
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote cartney Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGrid NavigateItems
    Posted: 05 July 2010 at 3:20am
hello;
   with version Xtreme ToolkitPro v13.2.1 .i need to navigate items but not value or caption using Tab key .and i want to select Constraints items with keyboard(1,2,3……9).However if tab focus on the item caption and it works.but if i tab to comboboxbutton ,it does not works.

my solution is NavigateItems(TRUE,TRUE);//tab caption and value
if(m_wndPropertyGrid.Create(r, this, 100))
     {
          m_2003Theme=new CMyPropertyGridOffice2003Theme(&m_wndPropertyGrid);
          m_wndPropertyGrid.ModifyStyle(0, XTP_PGS_OWNERDRAW);
          //m_wndPropertyGrid.SetTheme(xtpGridThemeOffice2003);
          m_wndPropertyGrid.SetCustomTheme(m_2003Theme);
          m_wndPropertyGrid.NavigateItems(TRUE,TRUE);//tab caption and value
          m_wndPropertyGrid.SetViewDivider(0.3);
          m_wndPropertyGrid.SetHelpHeight(35);
      }
//set focus on inplaceedit if current propertyitem is //being selected
//my question is how about the combobutton
void CPropertyGridItem::OnSelect()
{
     if(m_bNeedInputCheck)
          GetInplaceEdit().SetCheck(m_pField->GetpKey()->GetFieldCheck());
     else
          GetInplaceEdit().SetCheck(NULL);
     //CXTPPropertyGridItem::OnSelect();

     ASSERT(m_bVisible);

     CString strValue(m_strValue);

     if (m_pInplaceControls->GetCount() > 0)
     {
          CRect rcValue(GetInplaceWindowsRect());

          for (int i = m_pInplaceControls->GetCount() - 1; i >= 0; i--)
          {
               CXTPPropertyGridInplaceControl* pControl = m_pInplaceControls->GetAt(i);
               pControl->OnCreateWindow(rcValue);
          }
     }

     if ((m_nFlags & xtpGridItemHasEdit)/* && !m_pGrid->m_bTracking*/)
     {
          CPropertyGridInplaceEdit& wndEdit = GetInplaceEdit();

          wndEdit.SetValue(strValue);
          wndEdit.Create(this, GetValueRect());
          wndEdit.SetReadOnly(!IsAllowEdit() || m_bConstraintEdit);
     }
     else
     {
          GetInplaceEdit().HideWindow();
     }
     
if(GetFlags()&xtpGridItemHasEdit) {           ::SetFocus(GetInplaceEdit().GetSafeHwnd());    
if(!this->GetReadOnly()&&this->IsVisible())               GetInplaceEdit().SetSel(0,-1);
}

}
this image shows the sitution of focus on caption and i could select constraints item using keyboard

and this image shows tab to combobox(value item) and i could not select constraints item using keyboard
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.156 seconds.