Hi,
I'm exploring Infragistics windows forms controls for a while. I'm trying to write a common code for setting controls' properties programatically. For that I need to know the type of control in the collection. So how can I find the base class for infragistics controls and a method to get the type of control from the collection?
I'm not quite sure what you're trying to accomplish. Most, if not all, of the control in the Windows Forms suite derive from UltraControlBase, so you could check to see if a control is of that type, but I don't really know what kind of appearances that you're trying to set. Also, if you're trying to set several appearance-related properties, you might want to take a look at AppStyling and AppStylist, since you can load an ISL file that will apply to all of the controls in your application.
-Matt
Hi, Matt
Thanks a lot for your reply. Let me give in brief what I am trying to do.
I'm having multiple win forms containing the textboxes. I am trying to use the UltraTextEditor. I have written a common functions that handle the GotFocus and LostFocus events for some of the controls in each form(e.g. text boxes and combo boxes). I am passing the form name and control name as arguments to the function. Within the function code i'm checking the the type of control that has been passed as argument and if it is of type text box or combo box then I set few properties for that control. With the windows default controls the code works very fine. I am having problem with the ultraTextEditor and UltraComboEditor, as I can not pass the base class for the infragistic controls. But I found the turn arround and now my function can find out the type of control. Now the problem is that the GotFocus and LostFocus events are fired inconsistantly. When the textEditor has focus in it both GotFoucs and LostFocus are fired same time. If focus is moved from texteditor using tab key again the GotFocus is fired instead of LostFocus. I'm really struggling to understand this. Is this a kind of BUG in infragistic controls? What is the turn around for this?
-- Yuujin