Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-06-2009
Member
 
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....!
Reply With Quote
  #2  
Old 04-06-2009
Member
 
Join Date: May 2008
Posts: 2,293
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)
Reply With Quote
  #3  
Old 04-06-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 11:46 AM.