Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arranging controls

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
I have created an ActiveX user control called Standard

When I put an instance of this control on a form in effect creating an instance of my user control called Standard1 I can resize Standard1 but I cant get the actual control displayed at runtime to be resized to the width that the user has stretched it to.

Within the code for the control, UserControl.Width returns the width that I set for the usercontrol when I was designing that not the width of it when it has been put onto a form.

SO in a way I'm saying that:

UserControl.Width <> Standard1.Width

and i want to set:

UserControl.Width = Standard1.Width

in the code portion of the User Control.

Does anyone understand what I'm going on about?

Thanks!

elziko
 
In your UserControl_Resize event, place code to resize any child controls on your user control there.

You may also need to create separate property variable to hold the size of your user control in your UserControl class.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top