search for: create_grid

Displaying 14 results from an estimated 14 matches for "create_grid".

2007 Jan 04
3
grid control example doesn''t work on osx.4
...#39;'rubygems'' require ''wx'' app = Wx::App.new frame = Wx::Frame.new( nil , -1 , "MiniApp" ) #grid = Wx::Grid.new( frame , 2000, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::WANTS_CHARS,"this the panel name" ) tgrid = Wx::Grid.new(frame, -1) tgrid.create_grid( 19 , 16 ) frame.show() app.main_loop() --------- Any help would be appreciated I have to get a little utility running on my mac and a windows machine before the 18th. Sincerely, Hawley
2010 Sep 09
1
Wx::Grid and motion events, bug?
...lass MyFrame < Wx::Frame include Wx def initialize(parent = nil) super(parent, title: "Test", size: Size.new(400, 400)) self.background_colour = NULL_COLOUR StaticText.new(self, label: "") #Dummy @grid = Grid.new(self, size: Size.new(300, 200)) @grid.create_grid(10, 10) @grid.evt_motion{|e| p "!"; $stdout.flush} end end class MyApp < Wx::App include Wx def on_init @mainwindow = MyFrame.new @mainwindow.show end end x = MyApp.new x.main_loop - -------------------------------------------------------------- If I hover the...
2004 Nov 18
17
Wx::Grid Questions ...
I am trying to use a grid widget in my application, but run into a number of issues: -- Can they be placed in a panel? Or better yet, placed in sizer with other controls? I have only been able to place a grid inside a frame. -- Can you designate multiple rows (or columns) as being used for labels? -- Can you create cells that span cols (or rows)? -- What events are available to trigger on? How
2007 Feb 12
0
[861] trunk/wxruby2/doc/textile/grid.txtl: Added missing methods listing section
..."Grid#can_enable_cell_control":#Grid_canenablecellcontrol +* "Grid#can_have_attributes":#Grid_canhaveattributes +* "Grid#cell_to_rect":#Grid_celltorect +* "Grid#clear_grid":#Grid_cleargrid +* "Grid#clear_selection":#Grid_clearselection +* "Grid#create_grid":#Grid_creategrid +* "Grid#delete_cols":#Grid_deletecols +* "Grid#delete_rows":#Grid_deleterows +* "Grid#disable_cell_edit_control":#Grid_disablecelleditcontrol +* "Grid#disable_drag_col_size":#Grid_disabledragcolsize +* "Grid#disable_drag_grid_size...
2009 Dec 12
4
grid et boxsizer
Bonjour. Une fois mon application ouverte, je voudrais savoir, si cela est possible, comment dimensionner automatiquement la totalité des colonnes du grid à la taille de mon boxsizer, quand je change la taille de mon application? (puique mon grid est inséré dans mon boxsizer). merci
2007 Apr 27
1
panel as child of grid on Windows
...= MyPanel.new(frame, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE) frame.show() end end class MyPanel < Wx::Panel def initialize (parent, id, pos, size) super(parent, id, pos, size) grid = Wx::Grid.new(self, -1, Wx::DEFAULT_POSITION, Wx::Size.new (400,400)) grid.create_grid( 2, 2 ) panel = GridChildPanel.new(self, -1, pos, Wx::Size.new (100,100)) end end class GridChildPanel < Wx::Panel def initialize(parent, id, pos, size) super(parent, id, pos, size) set_background_colour(Wx::GREEN) button = Wx:: Button.new(self, -1, '...
2004 Nov 22
1
Layout Issue ...
...#39;Print'') @buttonSizer.add(@btn2, 0, Wx::ALIGN_CENTER_VERTICAL|Wx::ALL, 2) @buttonSizer end def createGridSizer @gridSizer = Wx::BoxSizer.new( Wx::VERTICAL ) @grid = Wx::Grid.new( @panel, -1, Wx::Point.new( 1, 1 ), Wx::Size.new( 500, 350 ) ) @grid.create_grid( 15, 7 ) @gridSizer.add( @grid, 1, Wx::GROW|Wx::ALL, 5 ) @gridSizer end def createInputSizer @inputSizer = Wx::FlexGridSizer.new( 4, 3 ) st1 = Wx::StaticText.new( @panel, -1, "Text:" ) @inputSizer.add( st1, 0, Wx::ALIGN_CENTER_HORIZONTAL|Wx::ALIGN_CENT...
2007 Mar 20
0
[903] branches/wxruby2/wxwidgets_282/samples: Added #!/usr/bin/env ruby to the grid sample.
...text("Cell #{evt.get_row} x #{evt.get_col} has changed") - end - end - - # Create a wxGrid object - def make_grid(panel) - @grid = Wx::Grid.new(panel, -1) - - # Then we call CreateGrid to set the dimensions of the grid - # (11 rows and 12 columns in this example) - @grid.create_grid( 20, 12 ) - @grid.set_default_cell_background_colour(Wx::WHITE) - # We can set the sizes of individual rows and columns - # in pixels, and the label value string - @grid.set_row_size( 0, 60 ) - @grid.set_row_label_value( 0, "Row1" ) - @grid.set_row_label_alignment(Wx::AL...
2004 Jun 02
13
wxGrid Question
When operating with a wxGrid is there a way to get a reference to the TextCtrl field that is created when you start typing in a cell. Also is there a way to get mouse events to work with a wxGrid, so far I can''t get any of them to work. I had tried various combo''s of: @grid.evt_left_down(){ |event| puts "Left mouse is down"; } using evt_left_down, evt_left_up,
2007 Feb 14
0
[875] trunk/wxruby2/samples: Add expanded grid sample
...text("Cell #{evt.get_row} x #{evt.get_col} has changed") + end + end + + # Create a wxGrid object + def make_grid(panel) + @grid = Wx::Grid.new(panel, -1) + + # Then we call CreateGrid to set the dimensions of the grid + # (11 rows and 12 columns in this example) + @grid.create_grid( 20, 12 ) + @grid.set_default_cell_background_colour(Wx::WHITE) + # We can set the sizes of individual rows and columns + # in pixels, and the label value string + @grid.set_row_size( 0, 60 ) + @grid.set_row_label_value( 0, "Row1" ) + @grid.set_row_label_alignment(Wx::AL...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...tebook") + mb.append(help_menu, "Help") + + set_menu_bar(mb) + end + + def setup_events + evt_erase_background { | e | on_erase_background(e) } + evt_size{ | e | on_size(e) } + + evt_menu(ID_CreateTree) { | e | on_create_tree } + evt_menu(ID_CreateGrid) { | e | on_create_grid } + evt_menu(ID_CreateText) { | e | on_create_text } + evt_menu(ID_CreateHTML) { | e | on_create_html } + evt_menu(ID_CreateSizeReport) { | e | on_create_size_report } + evt_menu(ID_CreateNotebook) { | e | on_create_notebook } + evt_menu(ID_CreatePerspective) { | e | on_create_p...
2007 Jul 23
11
Memory problem with GridCell*Editor
Alex, I was getting the following crashes when editing cells in a grid: ./init.rb:1072:in `main_loop'': undefined method `begin_edit'' for "_p_wxEvent":String (NoMethodError) from ./init.rb:1072 but only after the first App GC mark phase. So I changed all the GridCell*Editor.i files from GC_MANAGE to GC_MANAGE_AS_EVENT. Which stopped the crashing. My question
2004 Aug 19
28
Documents, Views and DocManagers
Hi, Are there any effort in making wxDocument, wxView, etc types of classes avaiable under wxRuby? For supporting SDI/MDI architecture. Cheers, Phuah Yee Keat
2004 Dec 09
6
Scrolling to the bottom of a Grid
Hi, Thanks to the newly added event handlers for Wx::Grid in the 0.6.0 release, I can now provide a much slicker intreface to my "data widgets" which heavily rely on that control. However, I haven''t quite figured out how to programmatically scroll to the last row of a populated grid (actually, the first empty row). So say that I have a grid with 200 rows only 20 of which