Custom Component - Graphical problems

Hi to all,
I have created a custom component:
image

But I have some troubles that i don’t know hot to resolve.
image
image

Some suggestion?
Thanks
Robert