Print Page | Close Window

How to select an item and activate edit

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=1485
Printed Date: 21 November 2024 at 4:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to select an item and activate edit
Posted By: RickSaada
Subject: How to select an item and activate edit
Date 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




Replies:
Posted By: Oleg
Date 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



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