Tuesday, May 8, 2007

Adorners and Glyphs

Currently, I've studied a bit about Adorner. With Adorners and Glyph, you can give full design time support for making some good components, especially such as multi tab component. I'm telling you, learning this stuff is more complicated than I expected. The concept is difficult as well. Much more difficult for a man who only have one year experience with .NET Framework. Now I feel sorry for being ignorance when .NET released. Too late for that now.

After a few days of learning and observing various codes, I learn that to fully support design time component, I must include some service before applying adorner and glyph. Adorner itself are is part of behavior service. Luckily, those services come from base class, if you inherit designer class to a ControlDesigner class. Base on that base class, you may add an adorner which contains any glyph which will represent your child control (it's an array). One note if you work with this, make sure you override dispose method which is removing your glyph from adorner. If you forgot to do this, the glyph will likely stay even when you remove the component and closing the form. The possible solution that I found is to close your IDE, and start it over again (and of course, override its dispose method).

I know it's a bit confusing if you read this post, but hey, I'm confused too. I'll try to hang out with this for a while, and once I fully understand about the concept, I'll try to make a new component that utilizes Adorner and Glyphs. I'll post some article about making this component too. So keep your eyes open for another updates in this blog and my vbcorner tutorial blog.

No comments: