Filip,
I don't see anything wrong with the code you've posted...this IS strange behavior. How about posting the code you've put in the subclass you've created...there might be something we can see in that.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com