Adding style to the string property in edit mode

Vote:
 
Hi. I want to increase the height and width of the input field to a string property in edit mode. I want all the 255 letters to be visible at the same time, as it is in the long string and the XHTML string. Any easy way to do this? BR, Tore
#12901
Mar 25, 2008 18:35
Vote:
 
You will need to create a custom property that inherits from PropertyString. Override the CreateChildControls and add the PageDefinitionTypePlugIn attribute to your class. Infact here is an example of the override method: public override void CreateChildControls(string renderType, System.Web.UI.Control container) { switch( renderType.ToLower() ) { case "edit": TextBox inputTextBox = new TextBox(); inputTextBox.TextMode = TextBoxMode.MultiLine; inputTextBox.Rows = 5; inputTextBox.Columns = 50; inputTextBox.MaxLength = 255; inputTextBox.Text = this.String; CopyWebAttributes( container, inputTextBox); container.Controls.Add(inputTextBox); container.Controls.Add(CreateParseValidator(inputTextBox)); break; default: base.CreateChildControls( renderType, container ); break; } } --Jeremy
#15069
Mar 25, 2008 18:46
Vote:
 
Thanks Jeremy!! BR, Tore
#15070
Mar 25, 2008 18:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.