Problem with custom widget creation

My custom widget can easily be created by draging and droping from the widget box but only while creating and realizing it through PtCreateWidget & PtReallizeWidget there appears a white dot at the top left corner of the window

Thanks

That sounds a little like there is a problem with the height and width.