Edit fields requiring Enter

Add-in Express™ Support Service
That's what is more important than anything else

Edit fields requiring Enter
 
Guest


Guest


In Version 1, I did not have to hit the Enter key before changing focus. It appears I have to do this in Version 2 - am I doing something wrong, or is there a work-around?

I thought I read something about this but can't find where I read it - sorry for taking up your time. Thanks.

Regards

Mike
Posted 18 Aug, 2004 14:46:52 Top
Guest


Guest


OK ... I found the information (see below) but I must be doing something wrong. If I change a value and click on another control, the OnChange event isn't fired and the displayed value returns to what it was. If I change the value and press the Enter key, the OnChange event is fired and the change remains.

This behaviour is different to version 1.

Thanks for your help.

Mike

***********************************************
Edit and combo boxes and the OnChange event

The OnChange event appears only when the value was changed and the focus was shifted. This is also not our bug but a MS guys?Â?Ð?é ?Â?Ð?ìtrick?Â?Ð?í <g>
Posted 18 Aug, 2004 15:26:20 Top
Eugene Starostin


Guest


Hi Mike,

Hmm... Very strange. The source code of command bar control event sinks has beed changed a bit. What hostapp do you use to test an ADX1-based add-in and an ADX2-based add-in (including version)? I want to reproduce this.
Posted 18 Aug, 2004 15:53:08 Top
Eugene Starostin


Guest


Mike,

I have just tested the AddinXPDemo demo-add-in from ADX 1.91 and... the OnChange event is fired when I press Enter. I tested on my Excel 2000.

I think there is our techwriter's mistake and we will fix it in the next build of ADX.
Posted 18 Aug, 2004 15:58:26 Top
Eugene Starostin


Guest


Aha... If I change a value and select any cell the event is fired... i.e. "when the value was changed and the focus was shifted". Agree?
Posted 18 Aug, 2004 16:00:22 Top
Guest


Guest


I am using Excel 2003. I have 2 edit fields on an Excel command bar.

With ADX 1.9.1, if I change a value in one edit field and click in the other, the value I just typed in is displayed.

Doing the same thing with ADX 2.1, the value in the first edit field reverts back to its original value. (e.g. original value in Field1 is 5.0. I type in 6.0 and click in Field2. Field1 reverts back to 5.0 and Field1.OnChange event is not fired].

Both edit fields do NOT have an OnChange event defined. I added events and found that with ADX 2.1, the OnChange event is fired only if I press the Enter key. If I change the value and then click in the other edit field, the event is not fired.

I hope that helps ... maybe I'm doing something wrong.

Regards

Mike
Posted 18 Aug, 2004 16:55:17 Top
Eugene Starostin


Guest


Hmm...
I have tried the same in AddinXPDemo based on 1.91 and get the same you got. If I enter a value to Edit1 and CLICK Edit2, the value reverts. But if I SELECT Edit2 via Tab, the value doesn't revert. MS's command bars seem to present us a lot of tricks!

Sorry, but I must ask you. What are you doing - click or select?
Posted 18 Aug, 2004 17:06:16 Top
Guest


Guest


Hi Eugene

I am clicking ... but it is working OK for me in 1.91 but not 2.1. In 2.1, if I use the Tab key, the value does not revert [but the OnChange event doesn't fire either].

Thanks

Mike
Posted 18 Aug, 2004 17:42:05 Top
Eugene Starostin


Guest


Thank you for your quick response.

I think we need some time to completely examine the problem. We will let you know about the results tomorrow or... today.
Posted 18 Aug, 2004 17:46:39 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Mike,

We have just created a test project with Add-in Express 1.91 and a test project with Add-in Express 2.1. Both behave absolutely the same. The test projects are located http://www.add-in-express.com/projects/edits.zip.

So, we don't find any difference between V1 and V2.

Also you can try to change the standard Excel edit (Zoom for example) and you will see how it should work.

In the next version of Add-in Express documentation we will describe the behavior of msoControlEdit in more detail.

Sincerely,
ADX Support Team
Posted 19 Aug, 2004 05:57:27 Top