2.在可keypress事件中判断key in ('0..9',#13) 如果不是chr(0)

解决方案 »

  1.   

    设置windowstyle为ES_RIGHT,
    但edit类窗口一生成就不能改windowstyle了, 
    所以需要在生成窗口时就要指定窗口属性,
    createwindow('edit',
                 'hello',
                 ws_visible+ws_child+es_right,
                 ..........);
      

  2.   

    设置form的keypreview为true.
    然后在edit的onkeypress里判断:
    if key in(0..9) Then
    Else
      key:=#13;
      

  3.   

    1,右对齐模式为BIDIMode属性
    2。可用strToFloat(edit.text);或Val函数
      

  4.   

    2、这个EDIT里可以显示非数字的东西,但同时也能显示数字,需要在strtofloat前面判断,不然就出错