我正在尝试使用绿色鞋创建一个GUI应用程序,使用Ruby和Green Shoes(green_shoes)GUI库通过LAN发送人们的消息,但我遇到了.style函数无法正常工作的问题。我以前和原鞋(红鞋)合作过,没有任何问题。以下是GUI的创建和样式代码:
Shoes.app(title: "Messenger", height: 150, width: 370, resizable: false) {
#creation
alert startMessage
@user_msg = para "Enter User"
@msgbox = para "Enter Message"
@user = edit_line
@msg = edit_line
@submit = button "Send"
@help = button "Send to PC"
@info = button "PC info"
#styles
@msg.style(:right => 5, :top => 57)
@user.style(:right => 5, :top => 25)
@user_msg.style(:left => 10, :top => 25)
@msgbox.style(:left => 10, :top => 57)
@submit.style(:left => 10, :bottom => 10)
@help.style(:left => 150, :bottom => 10)
@info.style(:right => 15, :bottom => 20)
#...