Results 1 to 3 of 3

Thread: .net Compact Framework autosize textbox

  1. #1
    Join Date
    Mar 2009
    Posts
    31

    .net Compact Framework autosize textbox

    I am having a textbox on the form & want to change the textbox to autosize the box with the text feild in it. Actually my Question how to fill the next column with the texbox???

    When TextBox->Width="Auto" And TextBox->HorizontalAlignment="Stretch" I get a big TextBox because it is adjusted based on the Text inside the TextBox. Is there any way to work on it...??? Please Help....!

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: .net Compact Framework autosize textbox

    The problem to solve, we use the native API DrawText. It calculates the size character type selected of the text in conformity with the uFormat parameters and the use of the images (device context).


    Code:
    [DllImport("coredll.dll")]
    static extern int DrawText(IntPtr hdc, string lpStr, int nCount, ref Rect lpRect, int wFormat)

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: .net Compact Framework autosize textbox

    Instead of, manually you should try the size a view of the Premium attribute and leave you Windows automatically the size of the text box. If you remember that most devices know between Hoch-und the landscape format opinion with only one depressing the key, then you should avoid it, hard coding somewhat. It is better, fine vote of elements position and size with the anchor attribute.

Similar Threads

  1. Configuration File Settings for the .NET Compact Framework
    By Bankebihari in forum Software Development
    Replies: 3
    Last Post: 10-06-2009, 07:01 AM
  2. How to set and hide the Datagrid column in Compact Framework
    By Balgovind in forum Windows Software
    Replies: 2
    Last Post: 09-06-2009, 08:11 PM
  3. .net compact textbox newline
    By Shashee in forum Software Development
    Replies: 3
    Last Post: 04-06-2009, 07:42 PM
  4. How to set Autosize Label .NET Framework
    By VinFanatic in forum Software Development
    Replies: 3
    Last Post: 23-05-2009, 10:20 AM
  5. How do i get same compact label autosize in .net
    By Dharmesh Arora in forum Software Development
    Replies: 2
    Last Post: 19-05-2009, 02:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,630,485.86421 seconds with 17 queries