search for: sel_command

Displaying 16 results from an estimated 16 matches for "sel_command".

2008 Sep 06
0
Tab control using FXRuby
...in, 2,MATRIX_BY_COLUMNS|LAYOUT_CENTER_X) # addr FXLabel.new(addr, "First Name" , nil,LABEL_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) fld1= FXDataTarget.new("") fld1a=FXTextField.new(addr,20, fld1, FXDataTarget::ID_VALUE, FRAME_SUNKEN|LAYOUT_FILL_X|LAYOUT_FILL_Y) fld1a.connect(SEL_COMMAND) do puts "fld1 contains #{fld1.value}" main.setPosition(-10, -10) end FXLabel.new(addr, "Surname" , nil,LABEL_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) fld2= FXDataTarget.new("") FXTextField.new(addr,20, fld2, FXDataTarget::ID_VALUE, FRAME_SUNKEN|LAYOUT_FILL_X|L...
2007 Dec 14
3
FXTabBook / FXTabItem / FXTabBar
...;'clearing'' the frames. It''s working. I end up using; parent.removeChild(righttopframe) righttopframe = nil Am afraid I stumbled on another question. I managed to put my application in a tabbook. I am looking to catch the event ''click on tabitem''. I tried SEL_COMMAND on TabItem but that seems not to work. I also would appreciate some text to explain the difference between Tabbar and Tabbook. Thanks, Ernst T.
2006 Apr 25
5
FXListBox ...connect(SEL_COMMAND)
...libo4.appendItem("4 very weird") libo4.appendItem("5 very weird") libo4.appendItem("6 very weird") libo4.appendItem("7 very weird") libo4.appendItem("8 very weird") libo4.numVisible = 6 libo4.connect(SEL_COMMAND) do |sender,selector,data| puts data end The data value printed is always 1. Not always, sometimes true, false ..... I am amazed. It''s a very common widget. I Hope I''m wrong somewhere Regards G?rard M?nochet -------------- next part -------------- A...
2005 Apr 05
0
Connecting messages to methods
...ox class Window < FXMainWindow 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_COMMAN...
2010 Jul 28
6
FXTextField.connect(SEL_CHANGED)
When I do an assignment to the text in a FXTextField, SEL_CHANGED is not raised. The text is changed on the screen. How do I detect that the text has been changed and/or ... how do I raise SEL_CHANGED? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100728/e0d169e5/attachment.html>
2008 Nov 21
3
Dynamic generation of a (sub) layout
...39;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 } selectMatrix = FXMatrix.new(@selectUVFrame, 4, MATRIX_BY_COLUMNS) @selectedUVs...
2008 Nov 11
3
FXTextField and number of digits after decimal point
Hello, Here''s the context: I read a number either pure integer or float with eventually up to 12 digits after the decimal point from a YAML file. The number is injected into a FXTextField with the following code: @value_sel = FXDataTarget.new(@value.to_s) @value_value = FXTextField.new(@matrix_mem_value, 20, at value_sel, :opts =>TEXTFIELD_NORMAL|JUSTIFY_RIGHT,
2009 Jun 23
9
Learning FXRuby please help!
...on = 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) do |sender,sel, data| yesWindow.create yesWindow.show puts "pushed hear button" puts "window shown?" + yesWindow.shown?.to_s end end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 FXApp.new do |app| Lookup.ne...
2005 Feb 18
5
FXTable segfaults after multiple setTableSize calls
...p, "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(TABLE_SIZE, 1) (0...TABLE_SIZE).each do |r| @table.setItemText(r,...
2006 Apr 18
1
FXSwitcher message problem
Hi, I use @mySwitcher.setCurrent( index ) and have a method connected to my FXSwitcher object: @mySwitcher.connect(SEL_COMMAND, method(:onCmdSwitch)) I would expect that onCmdSwitch(sender, sel, index) would receive the new index as third parameter. At least it should according to the fxruby documentation: "SEL_COMMAND: sent whenever the current (topmost) child window changes; the message data is an integer indicati...
2006 Mar 07
5
FXProgressDialog trouble
Hey all, I''m having trouble with FXProgressDialog-- I''m trying to use it to show the progress of a file upload.. I am running the upload in a separate thread that calls the dialog''s destroy method when its done.. the dialog closes, but the application remains non-responsive (as if its still in the execute loop). I''ve tried sending ID_ACCEPT to the dialog with
2004 Jul 20
7
radiobuttons are weird in 1.2.x series
Hello all, Run groupbox.rb example in any of the two alpha versions and click the radiobutton in the upper right group box (those named Hilvesum 1, Hilversum 2, etc). You''ll notice that once a radiobutton is checked, it remains checked when some other radiobutton is checked. What''s the reason? Thank you. -- Best regards, Yuri Leikind
2008 Aug 20
0
FXTable scrolling problem
...nt, :opts=>LAYOUT_FILL|TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE, :padding => 2) self.editable=false setBackColor(FXRGB(255, 255, 255)) setCellColor(1, 0, FXRGB(240, 255, 240)) setCellColor(1, 1, FXRGB(240, 255, 240)) rowHeader.width=30 verticalScrollBar.connect(SEL_COMMAND, method(:table_scrolled)) end I also defined the table_scrolled method as below to check that the event gets handled: def table_scrolled(sender, selector, data) puts "table scrolled to #{data}" end Now when I start the application, populate the table with records (50 records) fo...
2005 May 16
1
TEXTFIELD_ENTER_ONLY doesn''t work
Hi Lyle, I noticed that when creating a FXTextField with TEXTFIELD_ENTER_ONLY it still sends messages to its target when other keys than KEY_Return are pressed. I usually create a textfield this way: textfield = FXTextField.new(self, 50, self, ID_INPUT, TEXTFIELD_ENTER_ONLY) textfield.setText(aStr) textfield.setFocus textfield.move(x, y, w, h) textfield.show This way only the enter key should
2005 Dec 01
1
Can''t add text to FXCanvas
...AME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0, 0,70, 30) quitButton = FXButton.new(@rightFrame, "&Quit\tExit the Program\tTerminate Ruby Plot Program", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0, 0,70, 30) quitButton.connect(SEL_COMMAND) { getApp().exit(0) } #CANVAS FRAME canvasFrame = FXVerticalFrame.new(self, FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT, 0, 0, 0, 0, 0,0,0,0) @canvas = FXCanvas.new(canvasFrame, nil, 0, FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|L...
2005 Aug 05
3
Popup menu attached to a FXTreeItem
...on Windows. I''d like to display a popup menu after a right click on a tree item, I cannot make it work : #-------------------- root = FXTreeList.new(parent, 1, self, 0) pop = FXMenuPane.new(parent) expandCmd = FXMenuCommand.new(pop, "Expand", nil, app) expandCmd.connect(SEL_COMMAND) { root.currentItem.expanded=(true) } root.connect(SEL_RIGHTBUTTONRELEASE) do |sender, selector, data| pop.popup(root, data.rootclick_x, data.rootclick_y) end #--------------------- The same kind of code works with a FXTabItem instead of FXTreeItem. Would FXRuby 1.2 change something ? T...