gokhanoz
asked on
Change Location on Runtime
Hi. I want to change the location of the label (move on the statusbarstrip to left or right) which is on the statusbarstrip during resizing of the mdiform. Thanks
ASKER
OK but anchor is not present in the property list. And the location is not seems to be a member of it.
So you are talking about a Label control on the StatusBarStrip. How do you want to change the location of the label?
Bob
Bob
ASKER
Statusbarstrip is on the MDIparent form, and label control is on that statusbarstrip. I want to use anchor property to stuck the control to the rigth side of the screen. But it seems that anchor is not presenet on the property list. So I prefer to move that control to that right or the left depending the new shape of the mdiparent. Thats what I want to do. Thanks.
While the Anchor is not a browsable property, you can set it in code (at run-time):
Me.Label1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
Bob
Me.Label1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
Bob
ASKER
Bob, I am sorry but its not working. I am testing like that, I added a button, in the click event I wrote that code, and tested on run-time. label is keeping its original position..
How many other controls are on the StatusStrip control?
Bob
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
2) Setting a control's location to a point:
Me.Label1.Location = New Point(50, 50)
3) You could set the anchor, like Bottom, Right to keep the label stuck to the bottom-right side of the screen
Bob