PropertyGrid FocusOut event handling

Stimulsoft Reports.Flex discussion
Locked
evanl
Posts: 6
Joined: Tue Mar 24, 2015 10:36 am

PropertyGrid FocusOut event handling

Post by evanl »

Hello,
I am re-using the StiPropertyGrid in my application (not as part of the DesignerFx), and have been trying to customise the handling for FocusOut events.

What I'm seeing initially:
As it works normally, the StiPropertyGrid control does not generate StiPropertyGridEvent.PROPERTY_CHANGED events when the user has been changing the value of a property and the tab key is pressed. (In this scenario I am editing a String type property value directly in the property grid - I'm not using the modal dialog editor to change the value). It seems that it is necessary to click into another property control to cause either a StiPropertyGridEvent.PROPERTY_CHANGE or StiPropertyGridEvent.PROPERTY_CHANGED event to be generated for the property originally being edited.

What I'm wanting to achieve:
After editing a property value in the property grid, when I hit the tab key I want to get immediate notification of the attempt to 'move out' of that property field, indicating that the property value has 'changed' (even though the StiPropertyGrid may not yet consider it be changed). This behaviour is needed to support the undo/redo mechanism already implemented in my app (which is pre-existing to the inclusion of the StiPropertyGrid component).

What I've done so far:
I've added a listener for the FocusEvent.FOCUS_OUT event to the property grid, and by inspecting the propertyGrid.valueList.selectedItem property I can detect a change and to which property, if the user presses the tab key. The problem with this approach is that FOCUS_OUT events are generated if the user clicks on the label of another property, causing event scenarios where a different StiAdapterNode is reported than the one for the property the user was editing.

What I am hoping for:
I'm wondering if there is a way that when the tab key is pressed or another component, property or property label is clicked, to accurately know which StiAdapterNode/property the user was actually editing?

Thanks very much,
Evan
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: PropertyGrid FocusOut event handling

Post by Alex K. »

Hello, Evan

Can you please send us your request on support@stimulosft.com for further discussion of the problem.

Thank you.
Locked