Reputation: 49
I am working on a ruby app that needs to update text on the GUI at unknown times. The process I am using overlaps the text with text from the previous edit.
class_text is the element I need to edit. I have about 8 different places in the program that could potentially change the text. Sometimes when the text is changed the previous text does not get removed and instead the text overlaps itself.
$class_text.text = "Nothing scheduled to take attendance at this time."
This project was started by people before me and this is my first experience with Ruby. Thank you for any info you can send my way!
Upvotes: 0
Views: 31
Reputation: 396
without more specific information I've just tested a bare minimum for a scenario similar to yours (using Red Shoes though) and this works:
Shoes.app do
@test_stack = stack do
@edit_box = edit_box
@edit_box.text = "first text"
@edit_text = para "second text"
end
button "change" do
@edit_box.text = "first replacement"
@edit_text.text = "second replacement"
end
end
You could also try clearing the element first.
hth seba
Upvotes: 0