本文介绍了放大镜对标签的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我有两个问题:

1-是否可以将放大镜效果(缩放)放入存储在标签中的文本中?文本将根据用户输入而改变。



2 - 标签中存储的相同文本例如是

Label.text = ACBBBBCBBBCBABCBCBCBABABBABCBCBCBCBABBABABABBABABBABBABABA和更长的时间

我把它放在一个固定宽度的表格行中,但当它到达行的宽度时,我无法使文本在下一行继续

,所以我写了这段代码

Res是标签

Dict是从文本文件中读取的字符串

Dict可能包含制表符空格或换行符字符

 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 ++;
}
}
}

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



这段代码之后我仍然没有把它弄好!!

我得到类似的东西

ABBBBCBCBABSBSBBS

BCBCBHDBABABABABABB

ABCBCBABBABABABBBBB BABAB

BBBACTTTTABABABABA



我的文件将是一个DNA数据文件所以我没有单词我只有一系列字符



我需要它来证明两者都是合理的sides。

解决方案

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.

解决方案


这篇关于放大镜对标签的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 23:03