> I am trying to determine the type for ActiveControls using 3rd party
> controls (Infragistics in this case) during runtime and getting a rather odd
[quoted text clipped - 22 lines]
> (BTW, the test form is ONLY using UltraTextEditor controls, so the type
> should be the same for each.)
I'm going on assumptions here, but judging by the full name of that
control, I'd say you have focus to the editor, but it is actually
similar to a user control and what you're reading there is an embedded
editor inside what dropped on the form.
DevExpresses uses the same approach, with something like a
RepositoryTextEdit, which is then used internally in both grids and
normal droppable edit controls. I don't know if the DevExpress controls
would give me the same behavior as you're seeing though.
In any case, it's just a guess. I guess the best way to get a concrete
answer would be to ask the Infragistics guys about this.
Let me pose another question... What specifically are you trying to
accomplish with the code? Perhaps there's a different way to do what you
want to do than the one you're currently trying.

Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
Bill Fuller - 20 Apr 2008 23:18 GMT
>> I am trying to determine the type for ActiveControls using 3rd party
>> controls (Infragistics in this case) during runtime and getting a rather
[quoted text clipped - 40 lines]
> accomplish with the code? Perhaps there's a different way to do what you
> want to do than the one you're currently trying.
It sounds like you are pointing me in the right direction as to the source
of my problem. I did post the question to Infragistics, but need to find an
answer ASAP, if possible, and I have found them to be rather slow in
responding.
What I am trying to do (and it is working for the most part) is set a global
hook via IMessageFilter to convert the ENTER key to a TAB key for the entire
application, which is largely data entry type forms. However, I have also
set a virtual method for this that can be overridden in instances where the
Enter key on a particular form needs to be processed rather than use the
default, such as in the case where a multiline textbox that allows Enter key
handling may be on the form... or perhaps a button key. This code would
process the override if I can get it to work... was taken by surprise with
the type return as a standard Microsoft textbox works as expected.
>I am trying to determine the type for ActiveControls using 3rd party
>controls (Infragistics in this case) during runtime and getting a rather odd
[quoted text clipped - 22 lines]
>(BTW, the test form is ONLY using UltraTextEditor controls, so the type
>should be the same for each.)
Hmm, could it be that UltraTextEditor is a composite control,
containing an Infragistics.Win.EmbeddableTextBoxWithUIPermissions at
runtime?
As the latter seems to be derived from TextBox according to:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragisti
cs2.Win.v8.1~Infragistics.Win_namespace_hierarchy.html
what you could do instead of your if block above is this (untested):
TextBox tb = ActiveControl as TextBox;
if(tb != null) {
if(tb.Multiline) {
return true;
}
}
Regards,
Gilles.
Bill Fuller - 20 Apr 2008 23:35 GMT
>>I am trying to determine the type for ActiveControls using 3rd party
>>controls (Infragistics in this case) during runtime and getting a rather
[quoted text clipped - 43 lines]
> Regards,
> Gilles.
Your untested code fix did the trick...thanks.