search for: fxbutton

Displaying 10 results from an estimated 10 matches for "fxbutton".

Did you mean: xbutton
2008 Oct 27
2
Using BUTTON_TOOLBAR
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 1...
2008 Sep 06
0
Tab control using FXRuby
...setPosition(-0, -0) ## scroll back to first field ( it does ) fld1a.setFocus ## focus on first field ( it does NOT ! -> first BUTTON "New" ) end btns= FXHorizontalFrame.new(amain, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN) # btns new= FXButton.new(btns, "New", :opts => LAYOUT_FILL_X| BUTTON_NORMAL) new.connect(SEL_COMMAND) do |sender, sel, checked| # ## your button press code here ## end # new clear= FXButton.new(btns,"Clear", :opts => LAYOUT_FILL_X|BUTTON_NORMAL) clear.connect(SEL_COMMAND) do |sender, sel,...
2009 Jun 23
9
Learning FXRuby please help!
...39;fox16'' include Fox class Lookup < FXMainWindow def initialize(app) super(app, "Lookup window", :width=>400, :height=>600, :opts => DECOR_ALL|LAYOUT_FILL_X|LAYOUT_FILL_Y) bframe = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X) hearButton = FXButton.new(bframe, "Do you hear me?") yesWindow = FXHorizontalFrame.new(self, :opts => FRAME_GROOVE|LAYOUT_FILL_X) yesLabel = FXLabel.new(yesWindow,"Yes") yesWindow.hide puts "window shown?" + yesWindow.shown?.to_s hearButton.connect(SEL_COMMAND)...
2008 Nov 21
3
Dynamic generation of a (sub) layout
...e basic understanding here and couldn''t find any hint of what I''m doing wrong. Thanks for any help, Armin @selectUVFrame is of type FXVerticalFrame and is itself a child of another frame. def generateUVSelectors @selectUVFrame.each_child{|c| @selectUVFrame.removeChild(c)} FXButton.new(@selectUVFrame, "&Clear All", nil, nil, 0,).connect(SEL_COMMAND){ @selectedUVs.each{|cb| cb.setCheck(false)} drawScene } FXButton.new(@selectUVFrame, "&Set All", nil, nil, 0).connect(SEL_COMMAND){ @selectedUVs.each{|cb| cb.setCheck(true)} drawScene }...
2005 Feb 18
5
FXTable segfaults after multiple setTableSize calls
...MainWindow TABLE_SIZE = 10_000 def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) goButton = FXButton.new(mainFrame, " Go method 1") goButton.connect(SEL_COMMAND) { fillTable } goButton2 = FXButton.new(mainFrame, " Go method 2") goButton2.connect(SEL_COMMAND) { fillTable2 } end # fails after 2 to 15-20 iterations def fillTable @table.setTableSize(TA...
2005 Dec 01
1
Can''t add text to FXCanvas
...tatusBar.new(self, LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER) #BUTTONS @rightFrame = FXVerticalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y) FXVerticalSeparator.new(self, LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y|SEPARATOR_GROOVE) colorButton = FXButton.new(@rightFrame, "&Colors\tOpen Color Dialog\tOpen a dialog for selecting colors", nil, colorDialog, FXWindow::ID_SHOW, FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0,0, 70, 30) fontButton = FXButton.new(@rightFrame, "&Axes\nFont\t...
2007 Apr 27
2
mdiclient windows do not always activate on click
...f you change the mditest.rb example like so... --- mditest.rb 2007-04-18 16:19:59.000000000 -0700 +++ mdi.rb 2007-04-27 14:44:54.000000000 -0700 @@ -134,7 +134,7 @@ scrollwindow = FXScrollWindow.new(mdichild, 0) scrollwindow.verticalScrollBar.setLine(@font.fontHeight) btn = FXButton.new(scrollwindow, TYGER, - :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 600, :height => 1000) + :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 100, :height => 100) btn.font = @font btn.backColor = FXColor::White mdichild ...and the...
2006 Sep 22
1
A problem about updating an FXRuby program layout recursively
Dear all, I have a design question: assume we have an FXText field containing a sentence The <best> Ruby version is the current one. with "best" highlighted, and there is a choice of words | most wonderful |, | cutest |, | most effective | to replace "best". To do the replacement, I want to just click on any of three buttons. I want to iterate through all of the
2007 Aug 24
2
setting the font in FXText
...FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDT H) @fxtext = FXText.new(contents, nil, 0, TEXT_READONLY|TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) @fxtext.font = FXFont.new(getApp(), "courier", 8) # Ok button ok = FXButton.new(button, "OK", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y|LAYOUT_FILL_X) ok.setDefault ok.setFocus end end However, when I add the following method to FXTextDialog and call it I get a Seg Fault!: def set_font() @fxtext.font = FXF...
2005 Apr 05
0
Connecting messages to methods
...include Responder ID_SELF, ID_BTN = enum(FXMainWindow::ID_LAST, 2) def initialize(a, title) super(a, title, nil, nil, DECOR_ALL, 0, 0, 640, 480) self.setSelector(ID_SELF) self.setTarget(self) self.connect(SEL_CLOSE, method(:onClose)) self.connect(SEL_COMMAND, method(:onCommand)) FXButton.new(self, "Click me!", nil, self, ID_BTN) end def create super show(PLACEMENT_SCREEN) end def onClose(sender, sel, event) getApp.exit(0) end def onCommand(sender, sel, event) # ... end end -- I''d like to redirect all SEL_COMMAND events to Window::onCommand. A...