当前位置:首页 » 多媒体相关

如何定位动态生成的textbox,在整个页面上?


如何定位动态生成的textbox,在整个页面上?

推荐阅读

  • 05年Arima手机出货量将达1300万部 增长20% [详细内容]
  • Delphi托盘编程实战演练 [详细内容]
  • 有关电池的保养,指导 [详细内容]
  • 一窥戴尔生产流程:1.5秒钟生产1台个人电脑 [详细内容]
  • Delphi开发98屏幕保护预览程序 [详细内容]
  • 闹钟的误解 [详细内容]
  • 小品牌电脑投诉不断 恒生1个月投诉达20起 [详细内容]
  • 网友回答:
    网友:goody9807

    findcontrol("id")

    网友:net_lover

    style属性的top,left

    网友:panyee

    textbox   tb   =   (textbox)this.findcontrol("txt"   +   1);

    网友:maomaoysq

    page.controls.add(textbox);

    网友:cgmx

    利用panel,把动态生的控件装载进去

    网友:prczf

    http://expert.csdn.net/expert/topic/2146/2146645.xml?temp=.4301111  
      参考这个网页,  
      跟我问的问题差不多。

    网友:xrll

    在页面上先放一个表menutable:  
      for(int   j   =0;j<8;j++){  
      tablerow   r   =   new   tablerow();  
      int   numcells   =   4;  
      for   (int   i=0;   i<numcells;   i++)    
      {  
      tablecell   c   =   new   tablecell();  
      c.horizontalalign   =   horizontalalign.center;  
      c.height   =   (unit)25;  
      c.font.bold=true;  
      c.attributes.add("onmouseover",   "this.style.backgroundcolor=lightgoldenrodyellow");  
      c.attributes.add("onmouseout",   "this.style.backgroundcolor=lightblue");  
      c.style["cursor"]   =   "hand";  
      c.forecolor=color.blue;  
      textbox   tb   =     new   textbox();  
      tb.id="dd";  
      tb.text="aa";  
      c.controls.add(tb);  
      r.cells.add(c);  
      }  
      menutable.rows.add(r);  
      }  
     

    网友:meyer

    在你想放置控件的位置放上一个placeholder  
      使用placeholder来加载控件

    网友:xrll

    tablerow   r   =   new   tablerow();  
      int   numcells   =   4;  
      for   (int   i=0;   i<numcells;   i++)    
      {  
      tablecell   c   =   new   tablecell();  
      c.horizontalalign   =   horizontalalign.center;  
      c.height   =   (unit)25;  
      c.font.bold=true;  
      c.attributes.add("onmouseover",   "this.style.backgroundcolor=lightgoldenrodyellow");  
      c.attributes.add("onmouseout",   "this.style.backgroundcolor=lightblue");  
      c.style["cursor"]   =   "hand";  
      c.forecolor=color.blue;  
      r.cells.add(c);  
      }  
      menutable.rows.add(r);

    网友:xrll

    for(int   j   =0;j<8;j++){  
      tablerow   r   =   new   tablerow();  
      int   numcells   =   4;  
      for   (int   i=0;   i<numcells;   i++)    
      {  
      tablecell   c   =   new   tablecell();  
      c.horizontalalign   =   horizontalalign.center;  
      c.height   =   (unit)25;  
      c.font.bold=true;  
      c.attributes.add("onmouseover",   "this.style.backgroundcolor=lightblue");  
      c.attributes.add("onmouseout",   "this.style.backgroundcolor=white");  
      c.style["cursor"]   =   "hand";  
      c.forecolor=color.blue;  
      textbox   tb   =     new   textbox();  
      tb.id="dd";  
      if(i   ==   3)  
      tb.text="aa";  
      if(i==   1)  
      tb.text="hh";  
      else  
      tb.text="ui";  
      c.controls.add(tb);  
      r.cells.add(c);  
      }  
      menutable.rows.add(r);  
      }  
     

    .

    讨论区

    Login