Resizing user controls?? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Resizing user controls??

monoman81monoman81 Posts: 10Member
Hi, i send you my regards.

Look, i'm new in C# and i'm developing a control that binds a listview with a table of a MySql database. I'm beginning and i find my first question.

How can i do that when the control in design time is resized by the developer or myself all the inner controls in my own control resizes too to mantain the scale??

Thanks for your help... Have a nice day...

Comments

  • IDKIDK Posts: 1,784Member
    : Hi, i send you my regards.
    :
    : Look, i'm new in C# and i'm developing a control that binds a listview with a table of a MySql database. I'm beginning and i find my first question.
    :
    : How can i do that when the control in design time is resized by the developer or myself all the inner controls in my own control resizes too to mantain the scale??
    :
    : Thanks for your help... Have a nice day...
    :
    Set the new proporsions.
    If it's pure scaling, use this line
    newSize = oldSize * oldControlSize / newControlSize;
  • monoman81monoman81 Posts: 10Member
    : : Hi, i send you my regards.
    : :
    : : Look, i'm new in C# and i'm developing a control that binds a listview with a table of a MySql database. I'm beginning and i find my first question.
    : :
    : : How can i do that when the control in design time is resized by the developer or myself all the inner controls in my own control resizes too to mantain the scale??
    : :
    : : Thanks for your help... Have a nice day...
    : :
    : Set the new proporsions.
    : If it's pure scaling, use this line
    : newSize = oldSize * oldControlSize / newControlSize;
    :

    Thanks so much to take your time to look through my issue. I'll try what you're proposing me. Have a nice day...
  • weiccoweicco Posts: 950Member
    [b][red]This message was edited by weicco at 2006-2-7 22:57:25[/red][/b][hr]
    : Hi, i send you my regards.
    :
    : Look, i'm new in C# and i'm developing a control that binds a listview with a table of a MySql database. I'm beginning and i find my first question.
    :
    : How can i do that when the control in design time is resized by the developer or myself all the inner controls in my own control resizes too to mantain the scale??
    :
    : Thanks for your help... Have a nice day...
    :

    Try changing Control.Anchor property to what ever suits your needs. Also check out Control.Dock property.

    EDIT: Change those values in the Design View to see what they do...


  • monoman81monoman81 Posts: 10Member
    : [b][red]This message was edited by weicco at 2006-2-7 22:57:25[/red][/b][hr]
    : : Hi, i send you my regards.
    : :
    : : Look, i'm new in C# and i'm developing a control that binds a listview with a table of a MySql database. I'm beginning and i find my first question.
    : :
    : : How can i do that when the control in design time is resized by the developer or myself all the inner controls in my own control resizes too to mantain the scale??
    : :
    : : Thanks for your help... Have a nice day...
    : :
    :
    : Try changing Control.Anchor property to what ever suits your needs. Also check out Control.Dock property.
    :
    : EDIT: Change those values in the Design View to see what they do...
    :
    : Thanks... i'll try this solution too...
    :

Sign In or Register to comment.