Name Object focus

Posted by Elena_Perello on 27-Jul-2012 05:19

Hi,

I need know the name the object which is the focus.

Thanks for all!!

All Replies

Posted by Admin on 27-Jul-2012 05:26

FOCUS:NAME

Posted by Elena_Perello on 27-Jul-2012 05:35

Yes, that I've tried but always returns FocusCatcher and I want you to tell me the name of ultratexteditor

Posted by Admin on 27-Jul-2012 05:41

So you're using GUI for .NET and not ABL GUI?

In the Control's event handle, try

CAST (sender, System.Windows.Forms.Control):Name.

Otherwise, try:

The ActiveControl property of your Form.

http://msdn.microsoft.com/en-us/library/system.windows.forms.containercontrol.activecontrol

Posted by Elena_Perello on 27-Jul-2012 05:54

Yes,I'm using GUI for .NET

Yes, we had tested in the form KeyUp of the code, but to me the name of the form and not the objects in what is the focus (because he wants to detect it when you get to ENTER in the last field pass tab), so I need to know the name of the field where the focus is.

I'm gonna try the other code I've said, but wanted to know if there was any more directly, without going through all the objects on display.

Anyway, thank you very much for everything

(Traduced by Google, I'm sorry!!!)

Posted by Admin on 27-Jul-2012 05:56

I'm gonna try the other code I've said, but wanted to know if there was any more directly, without going through all the objects on display.

No need to go through a lot of objects...

THIS-OBJECT:ActiveControl () .

Should to the job (THIS-OBJECT should be your Form).

Posted by Elena_Perello on 27-Jul-2012 06:17

Is that I have some fields in a ultratabcontrol in the form, so it only works with fields that are out of ultratabcontrol. In the end I used something like the second code I've spent, so thanks for everything

This thread is closed