VB.NET - label & checkbox size

Asked By Developer Developer
29-May-08 03:08 AM
hi all,
i have a one problem,
i m working on online exam application using vb.net
in this application i m showing question in label and four option in checkbox,
but my problem is suppose some question are too long than they extend beyond the lenght of label control and user cant read full question.
what i want if question is too long than also user can see and able to read long question,
same problem for checkbox also

See this  See this

29-May-08 03:34 AM

Label control is not designed for this. Better to use a textbox control which has a possibility of scrollbars and a few other bits of functionality that you will need.... The backcolor and forecolor of the textbox can be set to any color you like, and the text-box disabled parameter can be set to true if you want it to look like a label control and to be read-only. Just make sure to change the forecolor text for your text control when it is disabled to something that you like.

OR if u want tow lines to come in label text then try something like this;

Label1.Text = "Line1" & Constants.vbCrLf & "Line2"

Go thr this link for more details;

http://www.experts-exchange.com/Programming/Misc/Q_21762699.html

Or To wrap a text in label go thr these links;

http://www.developerfusion.co.uk/show/1002/

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=476018&SiteID=1

This will give u an idea;

Best Luck!!!!!!!!!!!
Sujit.

label size  label size

29-May-08 03:54 AM
See the following link for TextWrapping in label control.

http://forums.asp.net/t/1263695.aspx
http://forums.asp.net/p/1239746/2261536.aspx

Literal Control  Literal Control

29-May-08 04:37 AM
Hi,
Instead of Label use Literal Control

for more details about literal control
refer the below link

http://www.w3schools.com/ASPNET/control_literal.asp

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/standard/literal.aspx
  Developer Developer replied to Sagar P
29-May-08 05:06 AM
thanks dude,
for ur Suggestion,
you sloved my first problem(Label Wrap).
but still i have a problem regarding CHECKBOX wraptext
guide me what to do for checkbox
Use label  Use label
29-May-08 06:47 AM

Why dnt u use label for chkbox also. Just put a label after a chkbox and make chkbox.Text="", give the chkbox text to that label so that user feels like it is a chkbox's text.

And you can wrap a text of a label. So i think this is the easiest way to solve your problem.

Try this, this will solve your problem.

Best Luck!!!!!!!!!!!!!
Sujit.

  Developer Developer replied to Sagar P
30-May-08 04:31 AM
    thanks for ur help.


Create New Account
help
Difference between vb and vb.net Hai, I want to know about the main difference between vb and vb.net. • The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB.NET uses the .Net Common Language Runtime (.Net CLR). The CLR is much better designed and
vb.net hi what is VB.net ?and benefits of vb.net what is asp.net and benefits of asp.net pls help me hi, what is VB.net ?and benefits of vb.net Visual Basic .NET (VB.NET or VB .NET) is a
Convert .NET Framework Hi Im new to vb.net. Can we convert vb6 forms, projects in to vb.net VB.NET Discussions VB.NET (1) VB (1) Ligthert (1) Wagner (1) Seth (1) Java (1) Rowe (1) Vb6 (1
Is VB.NET dead? .NET Framework Dear VB.NET Team, you did a wonderful job in making VB.NET a full fledged language, at least on the compiler side. When teaching students I always see that solving labs using VB.NET gives a faster result than C#. However the "distribution chain" to your customers is totally