首页 > 其他分享 >Powerbuilder练级攻略000_窗口helloword

Powerbuilder练级攻略000_窗口helloword

时间:2023-01-20 10:34:13浏览次数:45  
标签:helloword OK p001 Powerbuilder 练级 helloworld New SingleLineEdit sle

  1. 新建一个目录,如D:\pb_project\tutorial\p001_helloworld

  2. File-New-Workspace-OK,选中D:\pb_project\tutorial\p001_helloworld,打开,文件名输入p001_helloworld,保存

  3. File-New-Target-Application-OK,Application Name输入p001_helloworld,Finish

  4. File-New-PB Object-Window-OK

  5. 点右下角Layout,Title改成自己喜欢的名字,比如Area

  6. Insert-Control添加2个StaticText,2个SingleLineEdit,1个CommandButton,如下表所示

    控件类型 Name Text
    StaticText st_1 R=
    StaticText st_2 Area=
    SingleLineEdit sle_1
    SingleLineEdit sle_2
    CommandButton cb_1 计算
  7. 双击cb_1按钮,输入以下脚本

    Decimal r
    r = Dec(sle_1.text)
    sle_2.text = String(3.14 * r * r)
    
  8. 按Contrl+S, Windows里输入名称,如w_area,OK

  9. 双击p004_helloworld应用按钮,选左下角open,输入

    Open(w_area)
    
  10. 点运行按钮

标签:helloword,OK,p001,Powerbuilder,练级,helloworld,New,SingleLineEdit,sle
From: https://www.cnblogs.com/zhouyang209117/p/17062497.html

相关文章