Welcome! Log In Create A New Profile

Advanced

Global Event To handle different type of control

Posted by Prolay Sarkar 
Prolay Sarkar
Global Event To handle different type of control
February 13, 2009 03:12PM
Hi,

I need a feature where in I press a key eg: F10 and it should enter a date to the current field. I have used events which is working fine with edit controls. But i want to do it with table control also. So i need something to detect which type of control I am in.

I am using this code.
Event("DateFill", "*.*", WM_KEYDOWN)

Regards,
Prolay
Fabrice Harari
Re: Global Event To handle different type of control
February 13, 2009 04:33PM
Hi Prolay...

Event works, but you don't really need one... You can also use an outside screen button with the F10 shortcut...

For the control type, the first thing is to get the control name (in the event, there is one event variable returning the name, in the button, that would be the PreviousField function)

One you have that, the ..Type property should return what you need, when combined with inderection... That would be something like (not tested)
sControlName is string=PreviousField()
switch {sControlName,indControl}..Type
case typDate
...

Best regards

Prolay Sarkar
Re: Global Event To handle different type of control
February 13, 2009 05:13PM
Hi,

How to find whether the column of a table is a date field?

Regards
Prolay

{sControlName}..inputmask="MM/DD/YYYY" then

switch {sControlName,indControl}..Type
case typDate
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: