Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Change TextBox drawing rectangle
 

Change TextBox drawing rectangle

I am creating a custom textbox control, that inherits a standard textbox contro, and I would like to leave some space on the right sied of textbox, so I can use it for some information purpose. Ex

TextBOx.Width=100
I would like letters to be shown in 80 pixels only (and after if more letters are typed, they are scrolled, just like in original textbox behaviour, and the last 20 pixels should be reserved. HOw to change this "letter" rectangle?

Any ideas?
Goran _  Sunday, January 07, 2007 5:20 PM

you can use maskedtaexbox containter to formulate the text in the textbox

Gavin Jin - MSFT  Tuesday, January 09, 2007 7:58 AM


TextBOx.Width=100
I would like letters to be shown in 80 pixels only (and after if more letters are typed, they are scrolled, just like in original textbox behaviour, and the last 20 pixels should be reserved. HOw to change this "letter" rectangle?



I dont see how maskeditbox will help me with preventing letters to be shown in last 20 pixels of its ClientRectangle?
Goran _  Tuesday, January 09, 2007 5:49 PM

I have another meathed.you can lay a splitcontainer in a textbox,an then lay a second textbox in the splitcontainer,and make  the boderstyle=none and the multiline=true. that will done.hehe

I hope this will help you although there  maybe some better sollutions.

Gavin Jin - MSFT  Thursday, January 11, 2007 2:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Several control types not displayed correctly on a localized form when the display's DPI setting is changed.
• How To: From TypeConverter get Extender that Property is from
• VS2008 move controls outside visible area
• Auto-Generated code stays after removing the control
• How to set component's property value at DesignVerb click event?
• Inherited Toolstrips cannot be Designed
• Can't Dock Controls Inside GroupBox Component of UserControl (vb9)
• CodeDomSerializer deserialize does not recognise indexed property
• Extender and Panel
• Properties help