Click to See Complete Forum and Search --> : User control resize @ runtime
Geoff Gunson
Aug 6th, 2001, 07:19 AM
Hi
Is it possible for a control to determine it's size at runtime??
Ie if it was just a normal form you could code something like:
me.width = x
me.height = y
However I can't seem to find these properties for the user control.
Any Ideaz
CMD
G
iamdavid
Aug 6th, 2001, 12:24 PM
I ran into a similar problem trying to launch "What's This?" help from a popup menu on my control. From what I have read several properties/methods are controlled by the container that holds the usercontrol instead of the usercontrol itself. Two of these are the height and width properties.
To get these at runtime use the Extender object of the usercontrol (Usercontrol.Extender.Width). If you look up 'Extender object' in the VB help it says which properties/methods are controlled by the container (one of which is 'ShowWhatsThis', took me a few days to figure that one out as I'm still pretty new at this).
David
Geoff Gunson
Aug 6th, 2001, 11:36 PM
Cheers M80
G
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.