Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - How to select an item and activate edit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to select an item and activate edit

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


Joined: 08 November 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote RickSaada Quote  Post ReplyReply Direct Link To This Post Topic: How to select an item and activate edit
    Posted: 02 December 2004 at 12:18pm

I've got a tree view on a data file that opens tabbed views when you double click an item in the tree.  Each tabbed view is a property grid.  I'd like, after the grid is created and displayed in the new view, to select the first item in the grid, activate its edit, and select all the contents in the edit.  I can't figure out how to do this from code (as opposed to clicking in the item).   What's the secret?

Thanks,

Rick

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: 06 December 2004 at 7:29am

 CXTPPropertyGridItem* pItem = m_wndPropertyGrid.GetCategories()->GetAt(0)->GetChilds ()->GetAt(2);


 pItem->Select();
 m_wndPropertyGrid.SetFocus();
 pItem->GetInplaceEdit().SetFocus();
 pItem->GetInplaceEdit().SetSel(0, -1, FALSE);

ps. in you source version GetInplaceEdit can be protected (we changed it as public in last version only) so modify header file manually.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.