如何在 Ruby 的 glade3 中获取条目文本?
How to get entry text in glade3 in Ruby?
这是我第一次在 Whosebug 中获得帮助。
我正在用 glade3 制作 Ruby GUI,但我现在真的不知道如何从输入框中获取文本?
它应该从输入框中读取文本并将其写入 excel sheet.
希望你能帮助我:)
参见此处示例:https://xrob.wordpress.com/2007/04/20/creating-a-gui-application-using-glade-and-ruby/
We want to change something in the application so we will need to assign a variable to the widget that we want to alter. We want to alter “label1” and so we insert this code in the button1_clicked function.
@myEntryBox = @glade.get_widget(“myEntryBox”)
# You can now access properties like '@myEntryBox.text'
# Refer to documentation for exact name of the attribute
这是我第一次在 Whosebug 中获得帮助。 我正在用 glade3 制作 Ruby GUI,但我现在真的不知道如何从输入框中获取文本? 它应该从输入框中读取文本并将其写入 excel sheet.
希望你能帮助我:)
参见此处示例:https://xrob.wordpress.com/2007/04/20/creating-a-gui-application-using-glade-and-ruby/
We want to change something in the application so we will need to assign a variable to the widget that we want to alter. We want to alter “label1” and so we insert this code in the button1_clicked function.
@myEntryBox = @glade.get_widget(“myEntryBox”)
# You can now access properties like '@myEntryBox.text'
# Refer to documentation for exact name of the attribute