Dynamic Text in FXButton

Is there a way to have the text in a button change when you press the
button? For example, a button that says “Hi”, and when you click it
says “Bye”. I can’t find how to do this.

Thanks,

Alex

Alex DeCaria wrote:

Is there a way to have the text in a button change when you press the
button? For example, a button that says “Hi”, and when you click it
says “Bye”. I can’t find how to do this.

Thanks,

Alex

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

require ‘fox16’

include Fox

app = FXApp.new

mw= FXMainWindow.new(app, "Hello ",:width => 320, :height => 240)

button = FXButton.new(mw,“Hey”)
button.connect(SEL_COMMAND) do
button.text = “Bye”
end

app.create

mw.show(Fox::PLACEMENT_SCREEN)

app.run
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: http://getfiregpg.org

iD8DBQFIlDbBDbyapJB9FLwRAiR+AJ9xhftoZEX/pJZ+/Vf8X3BIZERrIwCbBdu9
YuoycBuIRg5lH6ByTdk61Ck=
=qOm9
-----END PGP SIGNATURE-----