Click here to Skip to main content
13,056,229 members (106,785 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have two questions:
1- Is it possible to have something like a magnifying glass effect (zooming) into text that is stored in label ? The text will change depending on user input .

2-the same text stored in label say for example is
I placed it in a table row with fixed width but I couldnt make the text continue on next line when it reaches the row's width
, so I wrote this code
Res is the label
Dict is string read from a text file
Dict may contain tabs spaces or newline characters
Res.Text = "";
          int counter = 0;
          for (int i = 0; i < Dict.Length; i++)
              if (counter == 100)
                  Res.Text += "<br>";
                  counter = 0;
              Found = false;

              for (int j = 0; j < IndexList.Count; j++)
                  for (int sub = 0; sub < IndexList[j].Count; sub++)
                     if (i == IndexList[j][sub])
                          Res.Text += "<span style='background-color: " + ColorList[j] + ";'>" + FMList[j] + "</span>";
                          i += GlobalVar.WLValue;
                          Found = true;
              if (!Found)
                  if (Dict[i] != ' ' && Dict[i] != '\r' && Dict[i] != '\n')
                      Res.Text += Dict[i];

after this code I still dont get it right !!
I get something like

my file will be a DNA data file so I dont have words I just have a sequence of characters

I need it to be justified from both sides.
Posted 20-Apr-13 8:00am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1. Nothing out-of-the-box, but check out this thread on the subject

2. You can specify either normal or break-word value with the word-wrap property. Normal means the text will extend the boundaries of the box. Break-word means the text will wrap to next line.
.break-word {
  word-wrap: break-word;


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170728.5 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100