search for: placement_screen

Displaying 13 results from an estimated 13 matches for "placement_screen".

2009 Jun 23
9
Learning FXRuby please help!
...uot;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.new(app) app.create app.run end end
2008 Oct 27
2
Using BUTTON_TOOLBAR
..., :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?
2008 Jan 21
1
FXSplashWindow
I saw Jeroen''s suggestion on how to use FXSplashWindow on the foxgui-users list and thought I''d try it. My attempt was as follows: require ''fox16'' include Fox app = FXApp.new("App") icon = nil File.open(''icon.gif'', ''rb'') { |f| icon = FXGIFIcon.new(app, f.read) } splash =
2005 Feb 18
2
Fixed column widths in FXTable?
...nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) table.setTableSize(50, 3) (0...50).each do |r| table.setItemText(r, 0, "#{r},0") table.setItemText(r, 1, "#{r},1") table.setItemText(r, 2, "#{r},2") end end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com Th...
2005 Dec 01
1
Can''t add text to FXCanvas
...def dumpFontDesc(lab,fd) print "fontDesc #{lab} = #{fd.inspect}\n" print "#{fd.face}, #{fd.size},#{fd.weight}," print "#{fd.slant}, #{fd.setwidth},#{fd.encoding}," print "#{fd.flags}\n\n" STDOUT.flush end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 # Construct an application application = FXApp.new("Button", "FoxTest") # Construct the main window PlotterWindow.new(application) # Create the application application.create # Run it application.run end -------------- next part...
2005 Feb 18
5
FXTable segfaults after multiple setTableSize calls
...us end # seems to require more iterations, but still fails def fillTable2 @table.setTableSize(0, 1) (0...TABLE_SIZE).each do |r| @table.insertRows(r) @table.setItemText(r, 0, "#{r}") end @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com The...
2008 May 21
0
What ever have I done wrong now?
...etc.) There''s also some discussion of it in section 7.7 of the book, where I talk about client-side versus server- side objects. If you just move those two calls to your create() method, e.g. def create super @table.fitColumnsToContents(0,2) @table.fitRowsToContents(0,2) show(PLACEMENT_SCREEN) end You should get the desired result. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: <h...
2005 Apr 05
0
Connecting messages to methods
...itle) 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. As an example, if one clicks the button, the message (SEL_COMMAND, ID_BTN) is sent to the Window class...
2006 Apr 10
1
Display an arrow, or transparent image colors
...igured I can display the Arrow using a .png image containing a red arrow on transparent background, loading that image using FXPNGIcon, and display it in FXImageFrame. Example code: require "fox14" include Fox app = FXApp.new window = FXMainWindow.new(app, "Demo") window.place(PLACEMENT_SCREEN) hframe = FXHorizontalFrame.new(window) file_display = FXTextField.new(hframe, 40, nil, 0, LAYOUT_CENTER_Y) file_display.text = "SoundFile.wav" arrow_image = File.open("ArrowShortRightRedT.png", "rb") {|f| FXPNGIcon.new(app, f.read) } # arrow_image.options = IMAGE...
2005 Mar 23
2
FXListBox size behavior?
...ain) myListBox.appendItem("a very long example") myListBox.appendItem("short") myListBox.appendItem("longer") myListBox.appendItem("even longer") myListBox.appendItem("shorter") myListBox.numVisible = myListBox.numItems application.create main.show(PLACEMENT_SCREEN) application.run
2010 Apr 09
2
Problem detecting keypresses in FXTable
I''m using an RXTable in my application and I would like to be able to select a row and then press the Delete key to delete the selected row. This does not seem to work, however, as apparently keypresses are not initially recognized. In my FXTable derived class I have: connect(SEL_KEYRELEASE) do |sender, selector, event| puts "code = #{''%X'' %
2008 Sep 06
0
Tab control using FXRuby
...ve quit= FXButton.new(btns,"Quit", :opts=>LAYOUT_FILL_X|BUTTON_NORMAL) quit.connect(SEL_COMMAND) do |sender, sel, checked| # ## your button press code here ## exit() end # quit # set initial field address fld1a.setFocus end # def initilize def create super show(PLACEMENT_SCREEN) end # create end # class MainWindow # ============= main prog ============ # Construct an application theApp = FXApp.new(''Smithy'',''Max'') # Construct the main window theApp.normalFont = FXFont.new(theApp,''Adobe Courier'',12,FONTW...
2008 Apr 14
3
Copy-paste between FXTable and FXTextfield
...TABLE_COL_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y) table.visibleRows = 3 table.visibleColumns = 3 table.setTableSize(3, 3) # Data field.text = ''copy me!'' table.setItemText(0, 0, ''copy me!'') end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run End ---------------------------------------------- Regards, Philippe Lang