Stop a Windows Control from getting to Small?

  • Thread starter Thread starter iKiLL
  • Start date Start date
I

iKiLL

Hi All

i am developing a Windows Mobile User Controll and i need to make sure that
it is not sized to small.
i am developing in C# with CF2 for Windows Mobile 5.

How is this done?

i am hoping there is like a Min width and height propertiy.

Thnaks
ink
 
Thanks I will give it a try.

i want them to be able to make it bigger. but just not to small.
 
In that function you will be able to determine the min sizes you want
the forms/controls to be. Then stop resizing from "accepting" if the
new size is below defined constants.

This way the user will be able to make it bigger, but then smaller
after that, until it is less then the starting dimentions.

Hope that helps
 
hi Norman,

This is what i have and it dose not seem to work at Design time. Is this
wrong.

protected override void OnResize(EventArgs e)
{
if (base.Width < 219)
{
base.Width = 219;
}
if (base.Height < 93)
{
base.Height = 93;
}
base.OnResize(e);
}

private void QuestionControl_Resize(object sender, EventArgs e)
{
QuestionAnswerControl oControl = (QuestionAnswerControl)sender;
oControl.vScrollBar.Maximum = oControl.pnSlide.Height -
oControl.pnMain.Height;
}


Thanks,
ink
 
Back
Top