Resizing a label control at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the easiest way to do this? I'm creating a layout designer type application

Thanks
John
 
Hi Jcrouse,

You can set allmost all properties at run time so the size of a label as
well.

And when you want to know how to do it, just open the designer generated
code, that shows it mostly direct. After a while you learn than what is
unneccessary in that because that is made to fit always.

However ask never for the "best" method in this newsgroup, the advantage
from VB.net is that there is not one "best" method so nobody can give you
that.

However there are a lot of good methods as well as bad methods

:-)

I hope this helps?

Cor
 
Good points Cor. Let me add a little more. I want to be able to control ther location and sizing with the mouse. THe same way you would do it in the designer only at runtime. I know how to change it directly in the code. I also know how to write out the top, left, height and width to an XML for saving the design. I just can't figure out the first part

Thanks
John
 
Well Cor, thanks to your example I am able to drag my label controls at run time. Thanks you. Now I need to be able to resize then also. Any tips or code examples for that

Thanks
John
 
Hi John,

I am glad that this helps you, for the rest it is in my opinion just
calculating, setting the right procedure and setting the right the
mousecursor in the right time.

I hope this helps you as well?

Cor
 
Anymore Ideas here. I found some code that allowed you to drak the right edge to make the label wider but I would really like the resizing to ack like it does in the from layout window, drag any of the sides or the corners.

John
 
I must be missing something, you can alter the height, width and location at
runtime using those properties.

OHM

jcrouse said:
Anymore Ideas here. I found some code that allowed you to drak the right
edge to make the label wider but I would really like the resizing to ack
like it does in the from layout window, drag any of the sides or the
corners.
 
Hi John,

Describe it more, because you told you are a newbie and now you maybe are
coming in an area, that is not that easy to describe.

Probably it is bassicly setting a switch with a mouse down and keeping track
of the mouse move in the mouse move event after that. And set the switch
back with the mouse up.


Cor
 
Back
Top