Textbox Control

Textbox Control

Post by Alber » Fri, 14 Jan 2005 17:55:06


Hi list,

I have following situation

dim s as string = "KEYFIELD"

I have a form with a usercontrol on it named "KEYFIELD"
to set its value i do KEYFIELD.value="SomeValue"

How can i use "s" to get the control. So that i can do like this

s.Value="SomeValue"

Hope i explained it clearly.

Thanks in advance,

Albert
 
 
 

Textbox Control

Post by Ed Kai » Fri, 14 Jan 2005 18:26:23

You can't do that in the .NET Framework.

 
 
 

Textbox Control

Post by Herfried K » Fri, 14 Jan 2005 18:45:03

"Albert" < XXXX@XXXXX.COM > schrieb:

Accessing controls by their names or indices
<URL: http://www.yqcomputer.com/ ;

--
M S Herfried K. Wagner
M V P <URL: http://www.yqcomputer.com/ ;
V B <URL: http://www.yqcomputer.com/ ;
 
 
 

Textbox Control

Post by Charles A. » Sat, 12 Aug 2006 08:44:13

Hello,

I have a textbox with data in it that extends beyond the size of the text
box. I am looking for a way to display the data in the textbox with the
data scrolled all the way to the right:

Before:
-------------------
| Peter Piper|
-------------------

After What I Want:
------------------
|led Pickels.|
------------------

The text is justified to the right (I already tried it with setting the text
justification to the right with no luck).

Thanks,

Chuck
 
 
 

Textbox Control

Post by Dave Sexto » Sat, 12 Aug 2006 09:39:47

Hi Charles,

Didn't you mean |led Peppers.|?

You can use the following code to programmatically set the position of the cursor in the TextBox to the end of the line:

txtRhymes.SelectionStart = txtRhymes.TextLength

TextAlign, as you found out, deals with appearance only and not behavior.

HTH

--
Dave Sexton
 
 
 

Textbox Control

Post by Charles A. » Sat, 12 Aug 2006 10:27:28

Thank You,

Chuck



Hi Charles,

Didn't you mean |led Peppers.|?

You can use the following code to programmatically set the position of the
cursor in the TextBox to the end of the line:

txtRhymes.SelectionStart = txtRhymes.TextLength

TextAlign, as you found out, deals with appearance only and not behavior.

HTH

--
Dave Sexton