search for: default_posit

Displaying 20 results from an estimated 70 matches for "default_posit".

Did you mean: default_port
2006 Sep 14
2
Patch to fix ArtProvider and ArtProvider sample
These patches better implement ArtProvider and add the demo for it. I also expanded the bigdemo window a little bit. I really think we should go larger but I suppose there might be some people at 800x600 still. Note that creating your own art provider still doesn''t quite work correctly. I didn''t have time to get into that. The RubyConstants.i.patch file looks weird. Not
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...ar, dlg.get_colour_data.get_colour ) + @frame.do_update + update_colours + end + + private + def make_metric_spin_ctrl(an_id, caption, metric) + metric_val = @frame.get_dock_art.get_metric(metric) + sp = Wx::SpinCtrl.new( self, an_id, metric_val.to_s, + Wx::DEFAULT_POSITION, + Wx::Size.new(50, 20), + Wx::SP_ARROW_KEYS, + 0, 100, metric_val) + + sz = Wx::BoxSizer.new(Wx::HORIZONTAL) + sz.add(1, 1, 1, Wx::EXPAND) + sz.add( Wx::StaticText.new(self, Wx::ID_ANY, caption) ) + sz....
2006 Dec 03
0
[778] trunk/wxruby2: Remove broken and deprecated LayoutConstraints, update samples & docs
...ints < Wx::Panel - def initialize(parent) - super(parent, -1) - set_auto_layout(true) - evt_button(100) {|event| on_button(event)} - - set_background_colour(Wx::Colour.new("MEDIUM ORCHID")) - - @panelA = Wx::Window.new(self, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::SIMPLE_BORDER) - @panelA.set_background_colour(Wx::BLUE) - txt = Wx::StaticText.new(@panelA, -1, "Resize the window and see\nwhat happens... Notice that\nthere is no OnSize handler.", - Wx::Point.new(5,5), Wx::Siz...
2007 Aug 24
2
SURVEY: wxRuby API style
...frame.title # as well as frame.get_title 2) Allow keyword constructors for window classes. This means you can write frame = Wx::Frame.new(parent, :title => ''foo'', :style => Wx::DEFAULT_FRAME_STYLE) as well as frame = Wx::Frame.new(parent, -1, ''foo'', Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::DEFAULT_FRAME_STYLE) In both cases, these would be based on the current wxSugar implementation, which is 100% backwards compatible - no existing code would need to be changed. Please feel free to comment on this thread here also thanks alex
2007 Mar 21
4
Bug in TextCtrl constructor
...ered a bug in the constructor for TextCtrl (originally uncovered while using WxSugar but it appears to apply to WxRuby itself as well). Here''s the output from irb: # ------ irb(main):001:0> require ''wx''; irb(main):002:0* ctl = Wx::TextCtrl.new(nil,-1,"",Wx::DEFAULT_POSITION,Wx::DEFAULT_SIZE,0,Wx::DEFAULT_VALIDATOR,"my_name") => #<Wx::TextCtrl:0x2e7a188> irb(main):003:0> puts ctl.get_name => nil # That should have printed "my_name" # ----- It''s not a show-stopper, though, as you can just assign to ctl.name. This bug sho...
2007 Jan 22
4
Adding sizers to other sizers doesn''t work
...t) sizer = Wx::BoxSizer.new(Wx::VERTICAL) set_sizer(sizer) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) row_sizer.add(Wx::StaticText.new(self, -1, "Character Name")) row_sizer.add(Wx::Panel.new(self,-1, Wx::DEFAULT_POSITION, Wx::Size.new (10,1))) row_sizer.add(Wx::StaticText.new(self, -1, "Player Name")) sizer.add(row_sizer) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) character_name_text = Wx::TextCtrl.new(self, -1) row_si...
2010 Mar 16
0
[ wxruby-Bugs-27976 ] Wx::ControlWithItems.select behavior is diferent than the documentation
...forge.org/doc/controlwithitems.html#ControlWithItems_select): >ControlWithItems#select > select(Integer n) >This is the same as set_selection and exists only because it is slightly more natural for controls >which support multiple selection. Code: > c = Wx::Choice.new self, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, (''1''..''5'').to_a > c.select 2 Output: > in `select'': Swig director pure virtual method called wxControlWithItems::Select (RuntimeError) VS. Code: > c = Wx::Choice.new self, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, (...
2007 May 11
0
[ wxruby-Bugs-10759 ] Wx::AuiManager.get_all_panes can not get all pane.
...gt;,name=b aui.get_pane---------- #<Wxruby2::AuiPaneInfo:0x2e3c0a4>,name=a #<Wxruby2::AuiPaneInfo:0x2e3bf78>,name=b ==================================================== =end class MainApp < Wx::App def on_init @frame = Wx::Frame.new(nil, -1, "bug get_all_panes",Wx::DEFAULT_POSITION,Wx::Size.new(800,600),Wx::DEFAULT_FRAME_STYLE) aui =Wx::AuiManager.new @frame pi = Wx::AuiPaneInfo.new.set_name(''a'').left.set_caption("a") aui.add_pane(createTextCtrl("a"), pi) pi = Wx::AuiPaneInfo.new.set_name(''b'...
2006 Aug 25
1
wxCheckListBox.rbw patch file
This fixes truncated text on the CheckListBox sample in bigdemo. Roy _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2004 Jan 27
2
The flicker of the status bar.
...est example) #----------------------------------- require ''wxruby'' include Wx class RbApp < App def on_init frame = MyFrame.new("Test status bar flicker") frame.show(TRUE) end end class MyFrame < Frame def initialize(title) super( nil,-1,title, DEFAULT_POSITION, DEFAULT_SIZE, DEFAULT_FRAME_STYLE | CLIP_CHILDREN | NO_FULL_REPAINT_ON_RESIZE ) @status_bar = create_status_bar(3) set_status_bar( @status_bar ) end end a = RbApp.new a.main_loop #------------------------------------- Thanks for any answer in advance. -- Pavel. mailto:p...
2007 Apr 27
1
panel as child of grid on Windows
...go to the underlying grid. Any ideas? Abram require ''wx'' class MainApp < Wx::App def on_init frame = Wx::Frame.new(nil, -1, "My Frame", Wx::Point.new(50, 50), Wx:: Size.new(450, 340)) panel = 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 = GridChi...
2006 Oct 19
0
[690] trunk/wxruby2/samples/text/unicode.rb: Placed controls within a panel so they appear on the correct themed background
...t;<span class="cx"> </span><span class="cx"> " << File.read( $utf8_file ) </span><span class="cx"> </span><span class="lines">@@ -24,9 +24,6 @@ </span><span class="cx"> Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::TE_MULTILINE) </span><span class="cx"> end </span><span class="cx"> </span><del>- # more ruby-ish - alias :<< :append_text - </del><span class="cx"> # run through a few useful method...
2007 Sep 03
1
API survey results & update
...All widgets and frames can be created using keyword args. This is really handy, for example, if you mainly use Sizers to manage layouts, and so rarely need to set an explicit size or position for a window. So, for a multiline TextCtrl, before, this was necessary Wx::TextCtrl.new(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::TE_MULTILINE) now this is enough: Wx::TextCtrl.new(parent, :style => Wx::TE_MULTILINE) 2) One of the keyword constructor aspects is to allow a shorter notation for Size and Position arguments, using a two-element array: Wx::TextCtrl.new(parent, :size => [200, 1...
2007 Jul 21
0
[1138] trunk/wxruby2/samples/html/html.rb: Place HTMLWindow in a panel so gets correct bg color on MSW
...'') </del><ins>+ @go_butt = Wx::StaticText.new(panel, -1, ''Location:'') </ins><span class="cx"> top_sizer.add(@go_butt, 0, Wx::ALL, 4) </span><del>- @addr_bar = Wx::TextCtrl.new(self, -1, ''HOME'', Wx::DEFAULT_POSITION, </del><ins>+ @addr_bar = Wx::TextCtrl.new(panel, -1, ''HOME'', Wx::DEFAULT_POSITION, </ins><span class="cx"> Wx::DEFAULT_SIZE, Wx::TE_READONLY) </span><span class="cx"> top_sizer.add(@...
2006 Nov 21
0
[744] trunk/wxruby2: get_data support & mem mgmt to all ControlWithItems types, using more
...+ + id = f.control.prepend_item(root, ''an array'', -1, -1, %w|foo bar baz|) + GC.start + assert_equal(%w|foo bar baz|, + f.control.get_item_data(id) ) + + f.close(true) + end + + def test_choice_itemdata + f = CtrlContainerFrame.new(Wx::Choice, Wx::DEFAULT_POSITION, + Wx::DEFAULT_SIZE, %w[hash string float]) + do_control_with_items_assertions(f) + f.close(true) + end + + def test_listbox_itemdata + f = CtrlContainerFrame.new(Wx::ListBox, Wx::DEFAULT_POSITION, + Wx::DEFAULT_SIZE, %w...
2004 Jan 08
3
pictorG
...{on_paint()} evt_left_down {on_click()} end def on_click @bitmap.destroy() self.destroy() end def on_paint dc = PaintDC.new(self) dc.draw_bitmap(@bitmap,0,0,true) end end class Pictures < ListCtrl # -- show the pictures def initialize parent super parent,-1,DEFAULT_POSITION,DEFAULT_SIZE,LC_ICON|LC_AUTOARRANGE assign_image_list(@imageList=ImageList.new(THM_WIDTH,THM_HEIGHT),IMAGE_LIST_NORMAL) # evt_list_begin_drag(self.get_id) {|e| log_status "Oh, dragging"; dragsrc = DropSource.new(self); true } evt_list_item_activated(self.get_id) {|e|...
2006 Oct 21
0
[698] trunk/wxruby2/samples/bigdemo/MDIDemo.rbw: Removed broken background stuff to stop crash on OS X (tho still crashes
...0 - </del><span class="cx"> module Demo </span><span class="cx"> </span><span class="cx"> class MyParentFrame < Wx::MDIParentFrame </span><del>- def initialize() - super(nil, -1, "MDI Parent", Wx::DEFAULT_POSITION, Wx::Size.new(600,400)) </del><ins>+ def initialize + super(nil, -1, "MDI Parent", Wx::DEFAULT_POSITION, + Wx::Size.new(600,400)) </ins><span class="cx"> </span><del>- @winCount = 0 - menu = Wx...
2004 Apr 21
2
Resizing a ListCtrl
...rame def initialize ## {{{ # init size, ionstance variables and super {{{ super(nil, -1, "test frame") #}}} # main layout {{{ @dlgSizer = BoxSizer.new(VERTICAL) centerSizer = BoxSizer.new(HORIZONTAL) # File List {{{ @fileList = ListCtrl.new(self, -1, DEFAULT_POSITION, Size.new(250, 200), LC_REPORT | LC_SINGLE_SEL) fillListCtrl() centerSizer.add(@fileList, 6, GROW|EXPAND) # }}} @dlgSizer.add(centerSizer, 1) @dlgSizer.set_size_hints(self) set_sizer(@dlgSizer) # end main layout }}} ## global events {{{ evt...
2007 Jan 04
3
grid control example doesn''t work on osx.4
...39;s installed properly on my system. I copied the code below from the tutorial---------- #!/usr/bin/env ruby -w require ''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. Si...
2005 Jan 22
9
Dragging images across the canvas
...am using wxRuby 0.6.0 on Win XP (Home) and Ruby installed using the latest one-click Ruby installer. Code follows, image file (sk.png) attached. TIA, -- shanko ################# require ''wxruby'' class MyFrame < Wx::Frame def initialize(title) super(nil, -1, title,Wx::DEFAULT_POSITION, Wx::Size.new(250,250)) image = Wx::Image.new("sk.png") @bitmap = Wx::Bitmap.new(image) @left_dn = false evt_paint { on_paint } evt_motion {|event| on_motion(event) } evt_left_down {|event| @left_dn = true } evt_left_up {|event| @left_d...