Print Page | Close Window

ValueChanged Event

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=10556
Printed Date: 27 November 2024 at 10:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ValueChanged Event
Posted By: McKloony
Subject: ValueChanged Event
Date Posted: 08 May 2008 at 6:53am
Is it possible to fire the ValueChanged Event also when the user is typing into a PropertyItem Cell? A lot of my user doesn't press the RETURN- or TAB Key.

-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



Replies:
Posted By: Oleg
Date Posted: 08 May 2008 at 9:33am
Hi,
ValueChanged will be fired even if user don't press RETURN- or TAB  
 
when item lost focus.


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


Posted By: McKloony
Date Posted: 08 May 2008 at 10:30am

But if you make a test, to view the Value of the Item, the old Value is set. Only if you press ENTER or RETURN or TAB, the new Value ist set to the Item.



-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Oleg
Date Posted: 08 May 2008 at 11:49am
Hello,
 
Do you see same with our sample ? With all items ?


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


Posted By: Aaron
Date Posted: 08 May 2008 at 3:49pm
Originally posted by McKloony McKloony wrote:

But if you make a test, to view the Value of the Item, the old Value is set. Only if you press ENTER or RETURN or TAB, the new Value ist set to the Item.

 
The order of events is:
 
press ENTER, TAB or looses focus >
 
1.      wndPropertyGrid_AfterEdit > Cancel = false > 2a. Cancel = True > 2b.
2a.    wndPropertyGrid_ValueChanged
2b.    wndPropertyGrid_LostFocus
 
Oleg:
when will this event fire?
 
Private Sub wndPropertyGrid_CancelEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem)
    MsgBox "I never seen this event fire before"
End Sub
 
Then there are events that we would like to see fired in order to have what you want, Marcus
 
Private Sub wndPropertyGrid_KeyDown(KeyCode As Integer, Shift As Integer)
    Msgbox "I never fire"
    'I would like to:  
    Call wndPropertyGrid_ValueChanged(currentEditingPropItem) 
End Sub
 
Private Sub wndPropertyGrid_KeyUp(KeyCode As Integer, Shift As Integer)
    Msgbox "I also never fire"
    'I would like to:  
    Call wndPropertyGrid_ValueChanged(currentEditingPropItem) 
End Sub
 
Please give us some advice, Oleg


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Oleg
Date Posted: 09 May 2008 at 1:29am
Hi,
CancelEdi fires if user press Escape to restore what he changed.
 
 


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


Posted By: Aaron
Date Posted: 09 May 2008 at 3:15am
Hi,
 
Correct again Oleg , you are really awake. But now I am too, yesterday I had a mini nervous breakdown hehehe
 
But what about the other events? Are there plans to implement these ?(well they are implemented but won't fire). When these events would fire most of us will do there own checking if a certain char is entered, we don't need RegEx  (just kidding).


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Oleg
Date Posted: 09 May 2008 at 4:50am
Hi,
 
What other events? AfterEdit or ValueChanged don't work for you ?


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


Posted By: Aaron
Date Posted: 09 May 2008 at 6:19am
Hi,
 
These:
 
Private Sub wndPropertyGrid_KeyDown(KeyCode As Integer, Shift As Integer)
    Msgbox "I never fire"
    'I would like to:  
    Call wndPropertyGrid_ValueChanged(currentEditingPropItem) 
End Sub
 
Private Sub wndPropertyGrid_KeyUp(KeyCode As Integer, Shift As Integer)
    Msgbox "I also never fire"
    'I would like to:  
    Call wndPropertyGrid_ValueChanged(currentEditingPropItem) 
End Sub
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: McKloony
Date Posted: 09 May 2008 at 10:09am
https://forum.codejock.com/uploads/20080509_100728_CodeJock_Proper.zip - uploads/20080509_100728_CodeJock_Proper.zip
 
I posted a verry small sample, that shows, that the ValueChange event will not fired, if the focus is lost. Just type in some data (don't press ENTER or TAB) and than click onto the button!


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Oleg
Date Posted: 10 May 2008 at 4:40am

Hi,

This project works for me. I entered string in first item, clicked button and see changed text in output.
 
Also add
 
Private Sub prpGrid1_ValueChanged(ByVal Item As XtremePropertyGrid.IPropertyGridItem)
    Debug.Print "prpGrid1_ValueChanged"
End Sub
and you will see Output after you click button.
 
 
What OS  do you have ?


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


Posted By: McKloony
Date Posted: 11 May 2008 at 6:26am
https://forum.codejock.com/uploads/20080511_062430_CodeJock_Proper.zip - uploads/20080511_062430_CodeJock_Proper.zip
 
OK, I changed the sample. Now i placed a command bar with a save button. Now the PropertyGrid doesn't lose the focus.


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Oleg
Date Posted: 11 May 2008 at 10:33am

Hi,

Its different situation. Pressing Control in toolbar don't grab focus. You can grab it manually :

Me.SetFocus



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



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