D
Dave
Hi,
I am creating a text editor from scratch by overriding a user control and
doing all the painting and user input myself. The text in the control will
always have the same number of rows and columns but the key point is that I
would like the text to cover the entire client area. What I mean by that is
if the user resizes the control to be narrow and long, or short and wide, I
want the text aspect ratio to be changed so the font is either tall and
skinny or short or fat.
However, in .NET there doesn't appear to be anyway of doing this. I have
tried wrapping the Win32 CreateFontInderect() but setting the LOGFONT's
width seems to have no effect. The aspect ratio of the font is always the
same.
Is there a way in GDI+ to do this? I don't think that drawing the text to a
back buffer, then resizing the buffer and blitting it to the user control
would be a high performance solution.
Does anybody know how this can be accomplished?
Thank you very much for any and all help.
Dave
I am creating a text editor from scratch by overriding a user control and
doing all the painting and user input myself. The text in the control will
always have the same number of rows and columns but the key point is that I
would like the text to cover the entire client area. What I mean by that is
if the user resizes the control to be narrow and long, or short and wide, I
want the text aspect ratio to be changed so the font is either tall and
skinny or short or fat.
However, in .NET there doesn't appear to be anyway of doing this. I have
tried wrapping the Win32 CreateFontInderect() but setting the LOGFONT's
width seems to have no effect. The aspect ratio of the font is always the
same.
Is there a way in GDI+ to do this? I don't think that drawing the text to a
back buffer, then resizing the buffer and blitting it to the user control
would be a high performance solution.
Does anybody know how this can be accomplished?
Thank you very much for any and all help.
Dave