Hey TT,
The remove_control works good. It indeed removes the control from the window.
The issue was with my code, I was using window.controls.each to call the remove_control in which, the control is deleted from the array.
My code:
@window.controls.each do |container| @window.remove_control(container) end
Code in remove_control
@controls.delete( control )
I commented the delete inside the remove_control function and used @windows.controls.clear
in my function.
Thanks & Regards,
Arun