TextBox.GetPreferredSize().Width is always 4

  • Thread starter Thread starter Steve Whine
  • Start date Start date
S

Steve Whine

Hello, I am trying to write a new LayoutEngine class following the
example given in the VS.NET 2005 help.

My problem is that TextBoxes always have their AutoSize property set to
'true' yet return a Width of 4 in GetPreferredSize().

In the help entry for TextBoxBase, it says "This property is not
relevant for this class", but how should LayoutEngine know this, and
know to discard the AutoSize information?

Thanks in advance,
Steve
 
Steve said:
Hello, I am trying to write a new LayoutEngine class following the
example given in the VS.NET 2005 help.

My problem is that TextBoxes always have their AutoSize property set to
'true' yet return a Width of 4 in GetPreferredSize().

In the help entry for TextBoxBase, it says "This property is not
relevant for this class", but how should LayoutEngine know this, and
know to discard the AutoSize information?

Thanks in advance,
Steve

Hi, has anyone got any thoughts on this? Anyone encountered it, or know
of any open source layout controls I can take a peek at to see how they
deal with this?
 
Back
Top