Print Page | Close Window

CXTPPropertyGrid notification

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=2214
Printed Date: 25 November 2024 at 1:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGrid notification
Posted By: hpesata
Subject: CXTPPropertyGrid notification
Date Posted: 12 May 2005 at 5:58am
Hi!

XTP 9601

I am using a CXTPProperytGrid within a dialog.
I am using the XTP_PGN_ITEMVALUE_CHANGED notification to
update my internal objects. this notification is not sent, when I click
on another dialog-item like a button. It is just sent when I press RETURN
or click another property-gid-item.

I also need the notification, when the user clicks somewhere else within
the dialog in order to correctly update my internal objects.

thanx in advance!

regards,
Hans




Replies:
Posted By: Oleg
Date Posted: 12 May 2005 at 3:44pm

Strange.. it must work...

Can you reproduce it with our PropretyGrid sample?



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: hpesata
Date Posted: 17 May 2005 at 4:55am
Hi Oleg!

thanx for your reply. it doesnt appear with your sample.
I managed to find out what is happening:

I have a dialog with a listbox on the left and a propertygrid on the right.
the listbox displays objects, the propertygrid displays the properties of the currently selected listbox-object. when the listbox-selection changes, the propertygrid gets updated with the properties of the new selected object.

when I change a property of an object via the inplacedit-control and click
e.g. on a button everything is fine, the property gets updated.
But if I click on another object within the listbox during editing a property,
the propertygrid gets updated with the properties of the new selected object
and AFTERWARDS the propertygrid notification message XTP_PGN_ITEMVALUE_CHANGED for the previous object-property
arrives and it is not valid at this time anymore.

so the problem lies within the mixed up order how messages get processed.
any hints on how to solve this ?

thanx in advance!

regards,
Hans



Posted By: Oleg
Date Posted: 17 May 2005 at 6:48am

Try to manually remove focus before you update propertygrid with new object:

 

viod List::OnClick()
{

    List.SetFocus();    // <- must send notification.

   UpdateGrid();

   
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: hpesata
Date Posted: 19 May 2005 at 7:58am
Hi Oleg!

the LVN_ITEMCHANGED msg arrives before the NM_CLICK notification.
I added the SetFocus() call to the LVN_ITEMCHANGED handler and it works now.

but I realized another big problem:
if my listbox has many objects, a horizontal scrollbar is displayed.
when I edit an item within the propertygrid and click on the scrollbar of the listbox,
no notification is sent. if the XTP inplace editctrl relies on focus-handling,
this is not sufficient in this case, because no focus-msgs are sent with a scrollbar.

I suppose there is an additional processing necessary like installing a message-hook to process mouse-activation msgs or the likes.

regards,
Hans



Posted By: Oleg
Date Posted: 20 May 2005 at 8:08am
Don't see "big problem" user scroll listbox without changing active item in list box and focus... So what the problem with it?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: hpesata
Date Posted: 20 May 2005 at 11:54pm
Hi Oleg!

the problem is, that the inplace-edit control stays visible when the user clicks the scrollbar of the listctrl. this is not really nice. the inplace-edit-ctrl is hidden when you click on any other control, why not in this case?

and:
this is just what I experienced now, maybe there are other possible inconsistent behaviours with other controls too, thats why I suggested to use a hook with mouse-activation msgs.

regards,
Hans




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