Validating input - CXTPPropertyGridItem |
Post Reply |
Author | |
Kevin6
Groupie Joined: 13 May 2005 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 14 October 2005 at 9:25am |
I am trying to validate a value in a CXTPPropertyGridItem. The handler OnValidateEdit seems a reasonable place to start. I validate the data and find a problem. I alert the user - however the PropertyGrid has moved the selected item to the next one in the PropertyGrid list.... This is not the behaviour I want - as in some cases its imperitive that I have a value in the list... I have got close - by calling CListBox::SetCurSel - but because I cannot set m_pSelected in CXTPPropertyGridView class - any subsequent selections are out of synchronisation for one click.... and cause the validation routine to fail.... Could you please suggest to me a method by which I may move the selected item - BACK in the PropertyGridView to the problem item????? regards Richard Edited by Kevin6 |
|
Kevin.
|
|
Kevin6
Groupie Joined: 13 May 2005 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
With repsect to the problem above - it seems to me that Validate is incorrectly specified. Currently it is declared as -: virtual void Validate(void); when I beleive it should really be virtual bool Validate(void); Where the default implementation always returns true. How when the user derives and implements this method should they return 'false' then the cursor does not move to the next item in the grid. Anythoughts on the initial post? |
|
Kevin.
|
|
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 |