CXTPPropertyGrid notification |
Post Reply |
Author | |
hpesata
Groupie Joined: 16 July 2004 Status: Offline Points: 60 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Strange.. it must work... Can you reproduce it with our PropretyGrid sample? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
hpesata
Groupie Joined: 16 July 2004 Status: Offline Points: 60 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
hpesata
Groupie Joined: 16 July 2004 Status: Offline Points: 60 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
hpesata
Groupie Joined: 16 July 2004 Status: Offline Points: 60 |
Post Options
Thanks(0)
|
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 |
|
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 |