Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello
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
Label.text= "ACBBBBCBBBCBABCBCBCBABABBABCBCBCBCBABBABABABBABABBABBABABA" and much much longer
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
C#
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;
                          counter++;
                      }
                  }
              }

              if (!Found)
              {
                  if (Dict[i] != ' ' && Dict[i] != '\r' && Dict[i] != '\n')
                  {
                      Res.Text += Dict[i];
                      counter++;
                  }
              }
          }

after this code I still dont get it right !!
I get something like
ABBBBCBCBABSBSBBS
BCBCBHDBABABABABABB
ABCBCBABBABABABBBB BABAB
BBBACTTTTABABABABA

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

1 solution

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.
CSS
.break-word {
  word-wrap: break-word;
}



Cheers,
Edo
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900