当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·一个有关颜色的问题请帮忙    »显示摘要«
    摘要: rgba为一个dword型的变量, 那么它的rgba分量是怎么排列的,从高字节到低字节! 最好给出一段测试用的代码,谢谢。 ......
    摘要: 即当该值存在时,有重复输入时系统不接受并提示或报警, 如员工编号、身份证号码之类 ......


清除数据

可不可以写很少的代码就清除窗体中所有TEdit中的文字,而不需写Edit1.text:=;Edit2.Text:=;.............

NO.1   作者: shun3

var   i:integer;  
  begin  
    for   i:=   0     to   form1.componentcount-1   do     //不好意思componentcount记不太清!!  
            if   components[i]   is   Tedit   then   //遍历窗体的所有控件,并判断是否是Tedit类型的.  
                (components[i]   as   Tedit).text:=;//如果是则把它清空  
  end;  
   
  如果错误,真的很抱歉!!!但是基本上是这样.

NO.2   作者: delphi0302

for   i   :=   0   to   ComponentCount   -   1   do  
          begin  
          if   Components[i]   is   TsuiEdit   then  
              (Components[i]   as   TsuiEdit).Text   :=   ;  
          if   Components[i]   is   TsuiCheckBox   then  
              (Components[i]   as   TsuiCheckBox).Checked   :=   False;  
          if   Components[i]   is   TsuiCheckListBox   then  
              (Components[i]   as   TsuiCheckListBox).Items.Clear;  
          end;

NO.3   作者: wdsimon

procedure   TForm1.Button1Click(Sender:   TObject);  
  var  
      i:integer;  
  begin  
    for   i:=0   to   form1.ComponentCount-1   do  
        if   Components[i]   is   tedit   then   (components[i]   as   tedit).Text:=;  
  end;

NO.4   作者: kuki84

for   i:=0   to   form1.ComponentCount-1   do  
        if   Components[i]   is   tedit   then   (components[i]   as   tedit).Text:=;  
 

NO.5   作者: joky1981

procedure   TForm1.Button1Click(Sender:   TObject);  
  var  
      i:   Integer;  
  begin  
      for   i:=1   to   2   do  
          TEdit(FindComponent(Edit+IntToStr(i))).Clear;  
  end;

NO.6   作者: Devlopered

for   i   :=   0   to   ComponentCount   -   1   do  
          begin  
          if   Components[i]   is   TsuiEdit   then  
              (Components[i]   as   TsuiEdit).Text   :=   ;  
          if   Components[i]   is   TsuiCheckBox   then  
              (Components[i]   as   TsuiCheckBox).Checked   :=   False;  
          if   Components[i]   is   TsuiCheckListBox   then  
              (Components[i]   as   TsuiCheckListBox).Items.Clear;  
          end;  
 


 ·信誉分还能回来吗    »显示摘要«
    摘要: 我不知道我是怎么册掉了一个帖子 被扣了5分 但信誉分还能回来吗 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE