Adding a button using FXRuby

Dark_Omen 0 Tallied Votes 329 Views Share

This is kind of an extension to my previous code snippet. This language is really fun to use. I find it pretty easy to use and understand. This will create a window with a button.

require 'fox'

include Fox

theApp = FXApp.new

theMainWindow = FXMainWindow.new(theApp, "Hello, World")
FXButton.new(theMainWindow, "Hello, World!")
theApp.create

theMainWindow.show

theApp.run
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

I always wondered what ruby looked like.

Thanks Dark

Dark_Omen 5 Posting Pro

Your welcome. Ruby is a fun language to learn.

vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

Okay Dark,
I expectect your scientific treatise on dichromatic bit warp in hyperspace by the end of the year! Ruby should make the postulates easy!

bumsfeld 413 Nearly a Posting Virtuoso

Mr. Omen,

your code samples a plane riboff from the examples that come with the download. Can't you apply a little imagination?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.