[fxruby-users] Using BUTTON_TOOLBAR
William Blum
wblum at pacbell.net
Mon Oct 27 02:53:54 EDT 2008
Hi, folks. I'm trying to make a toolbar with buttons that change appearance
when hovered over with the mouse. The docs on FXButton say that using
BUTTON_TOOLBAR "causes the edge of the button to be raised when the cursor
moves over it." What I'm getting is buttons without any frame, but they do
not change appearance when the cursor moves over them. I'm running Ruby
1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] on Microsoft Windows Vista
[Version 6.0.6001]. Here's my code:
require 'fox16'
include Fox
class MainWindow < FXMainWindow
def initialize(app)
super(app, "Toolbar Example",
:width => 485, :height => 300)
tool_bar_shell = FXToolBarShell.new(self)
top_dock_site = FXDockSite.new(self,
:opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
tool_bar = FXToolBar.new(top_dock_site, tool_bar_shell,
:opts => PACK_UNIFORM_WIDTH|FRAME_RAISED|LAYOUT_FILL_X)
new_button = FXButton.new(tool_bar,
"New File", :opts => BUTTON_TOOLBAR)
open_button = FXButton.new(tool_bar,
"Open File", :opts => BUTTON_TOOLBAR)
end
def create
super
show(PLACEMENT_SCREEN)
end
end
if __FILE__ == $0
FXApp.new do |app|
MainWindow.new(app)
app.create
app.run
end
end
Doesn't work on Vista? I'm doing something wrong?
More information about the fxruby-users
mailing list