比如说我有9个字符
不论数字还是字母(非汉字)
然后我有3个Edit,请问如何把他们按顺序显示在Edit里面
比如: 123456789  9个数字
我要 edit1显示123  edit2显示456 edit3显示789
请问该如何做?

解决方案 »

  1.   

    str:='123456789';
    Edit1.Text:=Copy(1,3,str);
    Edit2.Text:=Copy(4,3,str);
    Edit3.Text:=Copy(7,3,str);
      

  2.   


    str:='123456789';
    Edit1.Text:=Copy(str,1,3);
      

  3.   

    比较土的一断函数:
    procedure tt(ss:string);
    var   
       tempstr:string;
    begin
       tempstr:=copy(ss,0,3);
       edit1.text:=tempstr;
       tempstr:=copy(ss,3,3);
       edit2.text:=tempstr;
       tempstr:=copy(ss,6,3);
       edit3.text:=tempstr;
    end;你试试。
      

  4.   

    我想请问一下 Copy(ss,0,3)
    这个函数里面
    0是指起始位置,而3是指字符串长度吗?
      

  5.   

    esu(ESU) 的代码可以
    esu(ESU) 的代码会让字符错位显示
    但是我有点迷惑,这个是在知道那个字符串是什么的情况下才可以
    可是我的字符串有可能是系统自动生成的。
    所以我没有办法定位它~~~
    请教解决办法