Missing column weight in entry3 Tk example

Hello,

I was looking at examples in Ruby Tk and found that the grid example
is missing weight meaning that on window resize the grid stays
original size.

@@ -215,6 +206,8 @@
lower
TkGrid.configure(l1, l2, :in=>f, :padx=>‘3m’, :pady=>‘1m’,
:sticky=>:ew)
TkGrid.configure(l3, l4, :in=>f, :padx=>‘3m’, :pady=>‘1m’,
:sticky=>:ew)

  • TkGrid.columnconfigure(f, [0,1], :uniform=>1)
  • TkGrid.columnconfigure(f, [0,1], :uniform=>1, :weight=>1)

Given the stickiness is set on the above lines this is probably an
omission rather than intent.

Also the buttons need an expand

@@ -37,11 +27,10 @@
EOL

TkFrame.new(base_frame){|f|

  • pack(:side=>:bottom, :fill=>:x, :pady=>‘2m’)
  • pack(:side=>:bottom, :fill=>:x, :pady=>‘2m’, :expand=>true)

Please fix.

I can provide a real patch if needed.

Thanks

Michal

Hi Michael,

The issue tracking is running at https://bugs.ruby-lang.org

The code repository is on GitHub - ruby/ruby: The Ruby Programming Language

I think the file you’re talking about is
https://github.com/ruby/ruby/blob/trunk/ext/tk/sample/demos-en/entry3.rb
isn’t it?

You can just fork the repository as in

Fix it locally.
Push it back to your fork at github.
Issue a Pull Request so that some developer with permission could
merge your fix into trunk.
(As in About pull requests - GitHub Docs)

If you need assistance, just ask to the list.

If you’re not so sure about the fix, just fire an issue at the issue
tracking and keep an eye on it.

Congratulations for finding the issue.

Best regards,
Abinoam Jr.