Prabhee
Prabhee

Reputation: 71

Displaying data in a textbox

I am building an application using C#.NET and WPF. There is a page called "Update Question Database" which allows a user to view, add, and edit questions.

When viewing a question, the four options and the correct options are displayed in textboxes. However, the length of the answer is more than the width of the textbox. How can I display that hidden part to my user?

I've tried but cannot set the multiline property of textbox to true. There is no multiline option.

Upvotes: 0

Views: 137

Answers (2)

Jignesh Rajput
Jignesh Rajput

Reputation: 3558

if you are work in WPF so you have set property in textbox

TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible"
AcceptsReturn="True"

e.g.

<TextBox Height="66" Margin="563,46,265,0" Name="textBox1" VerticalAlignment="Top" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>

Upvotes: 1

user1082916
user1082916

Reputation:

The normal TextBox supports this, you just have to enable it. I think it's TextWrapping or AcceptsReturn that turns it on.

Upvotes: 1

Related Questions