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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the width of a control to be the same as that of another

Status
Not open for further replies.

Custom24

Programmer
Nov 27, 2001
591
GB
Hi
How can I set the width of one control to be the same as that of another. I tried this

Button1.Width = New Unit(Button2.Width.Value)

But it only works when the width of button 2 is set explicitly at design time. If I leave the propery blank, then the width of button2 comes back as 0.0, and results in making button 1 invisible.

Thanks
Mark Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top