Hi Gaby,
TestComplete has special support for the WinTree control from Infragistics. The tool should record the expand actions automatically without any need to write the corresponding code manually. You can find information on this in the
InfragisticsWinTree Object help topic.
If TestComplete does not work with your control in the way described in this topic, most probably, you are working with a descendant of the supported control. In this case, you need to map it to the supported control using the Object Mapping feature as it is specified in the mentioned topic.
Please let me know whether this information helps.