Skip to main content

[archive] ActiveX Event - disable event

  • October 12, 2010
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 12 October 2010]

Hi There,

I have created a custom control which is basically Microsoft Rich Text Box control. This was done to facilitate correct as you type spell checking etc.

So I have created my control in a new 01 screen rec to be displayed as requried.
01 Main-io-SFIText, @SFITextBox,
COL 20.40, LINE 70.20, LINES 19.80 CELLS,
SIZE 58.40 CELLS,
ID IS 144, INITIAL-STATE (ActiveX-Res, "Main-io-res"),
use-return
VISIBLE visible-sfitext.

and display it on the main window handle:
display main-io-sftext upon care-window

This all works great, but every time I click inside the textbox control an accept event is created (96) which then takes the focus of my textbox. Therefore I am never able to type in it. How do I stop this particular control from firing off events ?

Thanks in advance.

Juls

2 replies

[Migrated content. Thread originally posted on 12 October 2010]

Hi There,

I have created a custom control which is basically Microsoft Rich Text Box control. This was done to facilitate correct as you type spell checking etc.

So I have created my control in a new 01 screen rec to be displayed as requried.
01 Main-io-SFIText, @SFITextBox,
COL 20.40, LINE 70.20, LINES 19.80 CELLS,
SIZE 58.40 CELLS,
ID IS 144, INITIAL-STATE (ActiveX-Res, "Main-io-res"),
use-return
VISIBLE visible-sfitext.

and display it on the main window handle:
display main-io-sftext upon care-window

This all works great, but every time I click inside the textbox control an accept event is created (96) which then takes the focus of my textbox. Therefore I am never able to type in it. How do I stop this particular control from firing off events ?

Thanks in advance.

Juls
The code for disabling events from firing on active-x controls is the following. Be careful using it though, I found you can only really do it once and can't change it on the fly within your code, as things start to get wonky. So get yoru list of events that you are not going to ever use and set them once at the beginning of the program.


           MODIFY [I]Activex-Control [/I] AX-EVENT-LIST IS
                 ([I]Add numeric events here[/I])
           MODIFY [I]Activex-Control [/I] EXCLUDE-EVENT-LIST 1.

[Migrated content. Thread originally posted on 12 October 2010]

Hi There,

I have created a custom control which is basically Microsoft Rich Text Box control. This was done to facilitate correct as you type spell checking etc.

So I have created my control in a new 01 screen rec to be displayed as requried.
01 Main-io-SFIText, @SFITextBox,
COL 20.40, LINE 70.20, LINES 19.80 CELLS,
SIZE 58.40 CELLS,
ID IS 144, INITIAL-STATE (ActiveX-Res, "Main-io-res"),
use-return
VISIBLE visible-sfitext.

and display it on the main window handle:
display main-io-sftext upon care-window

This all works great, but every time I click inside the textbox control an accept event is created (96) which then takes the focus of my textbox. Therefore I am never able to type in it. How do I stop this particular control from firing off events ?

Thanks in advance.

Juls
The code for disabling events from firing on active-x controls is the following. Be careful using it though, I found you can only really do it once and can't change it on the fly within your code, as things start to get wonky. So get yoru list of events that you are not going to ever use and set them once at the beginning of the program.


           MODIFY [I]Activex-Control [/I] AX-EVENT-LIST IS
                 ([I]Add numeric events here[/I])
           MODIFY [I]Activex-Control [/I] EXCLUDE-EVENT-LIST 1.