您可以在数据窗口控件中创建这些类型的对象。通常,这将是一系列“修改”语句。以下是PowerBuilder帮助中的一个示例:
string modstring modstring ='创建矩形(Band = background X =“206”Y =“6” height =“69”width =“1363”brush.hatch =“6”brush.color =“12632256” pen.style =“0”pen.width =“14”pen.color =“268435584”background.mode =“2” background.color =“ - 1879048064”name = rect1)' dw_cust.Modify(modstring)
string modstring
modstring ='创建矩形(Band = background X =“206”Y =“6” height =“69”width =“1363”brush.hatch =“6”brush.color =“12632256” pen.style =“0”pen.width =“14”pen.color =“268435584”background.mode =“2” background.color =“ - 1879048064”name = rect1)'
dw_cust.Modify(modstring)
这会在数据窗口的背景中创建一个矩形。如果你需要移动东西,你必须设置一个计时器,然后适当地改变x和y属性。
在PB中创建一个俄罗斯方块类型的游戏将是一个相当大的成就。我以前用PB制作过游戏,但没有一个具有俄罗斯方块的移动复杂性。