Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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
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 20-Apr-13 9:00am

1 solution

Rate this: bad
good
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;
}
 

Cheers,
Edo
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 202
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2014
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