编辑框文本垂直居中

光庆 11月前 1276

Code AardioLine:17复制
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
    • import win.ui;
    • /*DSG{{*/
    • var winform = win.form(text="aardio form";right=759;bottom=469)
    • winform.add(
    • button={cls="button";text="Button";left=312;top=288;right=448;bottom=360;z=2};
    • edit={cls="edit";text="Edit";left=232;top=64;right=504;bottom=176;autovscroll=false;border=1;multiline=1;z=1}
    • )
    • /*}}*/
    • winform.button.oncommand = function(id,event){
    • var rect = winform.edit.getClientRect()
    • rect.top = winform.edit.height/2+winform.edit.font.h;
    • rect.bottom = winform.edit.height
    • winform.edit.setClientRect(rect)
    • winform.edit.onOk = λ()true;
    • }
    • winform.show();
    • win.loopMessage();


    最新回复 (0)
    返回