How to select item for edit |
Post Reply |
Author | |
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
Posted: 01 June 2006 at 11:05am |
Hello,
In a function i will save the current item state (edit,..) then i remove all item, put new items, and set old item state. void MyFunction() { bool bSetFocus = false; UINT nID = 0; CXTPPropertyGridItem *pItem = GetSelectedItem(); if (pItem) { nID = pItem->GetID(); if (pItem->GetFlags() & (xtpGridItemHasEdit | xtpGridItemHasExpandButton | xtpGridItemHasComboButton)) bSetFocus = true; } __super::Refresh(); // Clear and fill new if (bSetFocus) { CXTPPropertyGridItem *pItem = FindItem(lParam); if (pItem) pItem->Select(); } } But after pItem->Select() i don't see the Inputcursor. Jimmy |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, try manually set focus: pItem->GetInplaceEdit().SetFocus(); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |