471,624 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Height of a control

How do I set the height of a control from another control like

Me.Panel1.Height=300

Rehiaa
Nov 21 '05 #1
3 1111
Me.Panel1.Height = Me.Panel2.Height
"reidarT" <re****@eivon.no> schreef in bericht
news:Oo**************@TK2MSFTNGP10.phx.gbl...
How do I set the height of a control from another control like

Me.Panel1.Height=300

Rehiaa

Nov 21 '05 #2
"reidarT" <re****@eivon.no> schrieb:
How do I set the height of a control from another control like

Me.Panel1.Height=300

Your code should work.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
"reidarT" <re****@eivon.no> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl...
How do I set the height of a control from another control like

Me.Panel1.Height=300


This code will work assuming that "Me" is a form on which a control
called Panel1 exists.

If you wanted to manipulate the Panel from, say, another Button on
the same form, you'd need to get an object reference to the Panel
that the button can use. That's a little more involved, looking something
like (untested) :

Private Sub Button1_Click( _
ByVal sender as Object _
, ByVal e as Stystem.EventArgs _
) Handles Button1.Click
DirectCast( Me.FindForm, Form1 ).Panel1.Enabled = False
End Sub

HTH,
Phill W.
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ALESSANDRO Baraldi | last post: by
5 posts views Thread by Eric | last post: by
2 posts views Thread by Robson Carvalho Machado | last post: by
reply views Thread by Laksh | last post: by
2 posts views Thread by Steve Bottoms | last post: by
3 posts views Thread by Olaf Rabbachin | last post: by
12 posts views Thread by Peter | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.