Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGrid notification
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGrid notification

 Post Reply Post Reply
Author
Message
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGrid notification
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.