From: Ruby Student Date: 2013-07-02T00:24:50+09:00 Subject: Re: Help needed drawing a Sudoku board with green shoes --001a11c210cc41eacd04e074d4e4 Content-Type: text/plain; charset=ISO-8859-1 ashbb, That is a nice "trick" indeed. Hey, it does the job. Thank you for your help. On Mon, Jul 1, 2013 at 8:58 AM, ashbb wrote: > Hi Ruby Student, > > I'm not sure this is the solution you are looking for. But try it out. ;-) > > > require "green_shoes" > require 'rubygems' > > Shoes.app :height => 666, :width => 811, :resizable => false do > background magenta > title (strong("Sudoku")), :size => 26, :align=>'center' > para " " > para " " > > @btn = Array.new(9) {Array.new(9) {123456789}} > > nostroke > rect 0, 100, 86*9+6, 53*9+3, fill: green > rect 86*3+3, 100, 86*3, 53*3+2, fill: yellow > rect 0, 100+53*3+2, 86*3+3, 53*3, fill: yellow > rect 86*6+3, 100+53*3+2, 86*3+2, 53*3, fill: yellow > rect 86*3+3, 100+53*6+2, 86*3, 53*3+1, fill: yellow > > > (0..8).each do |r| > stack :margin => 3 do > flow :width => 866 do > (0..8).each do |c| > @btn[r][c] = button "123456789", :width => 86, :height => 50 > end # End do c > end # flow > end # End stack > end # End do r > end # app > > Regards, > ashbb > -- Ruby Student --001a11c210cc41eacd04e074d4e4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
ashbb,

That is a nice "trick&q= uot; indeed. Hey, it does the job.

Thank you for your help.


On Mon= , Jul 1, 2013 at 8:58 AM, ashbb <ashbbb@gmail.com> wrote:
Hi Ruby Student,<= br>
I'm not sure this is the solution you are looking for. But= try it out. ;-)


require "green_shoes"
require 'rubygems'
Shoes.app :height =3D> 666, :width =3D> 811, :resizable =3D> fal= se do
=A0=A0 background magenta
=A0=A0 title (strong("Sudoku")), :si= ze =3D> 26, :align=3D>'center'
=A0=A0=A0 para " "= ;
=A0=A0 para " "

=A0=A0 @btn =3D Array.new(9) {Array.n= ew(9) {123456789}}
=A0=A0
=A0=A0 nostroke
=A0=A0 rect 0, 100, 86*9+6, 53*9+3, fill: green
=A0= =A0 rect 86*3+3, 100, 86*3, 53*3+2, fill: yellow
=A0=A0 rect 0, 100+53*3= +2, 86*3+3, 53*3, fill: yellow
=A0=A0 rect 86*6+3, 100+53*3+2, 86*3+2, 5= 3*3, fill: yellow
=A0=A0 rect 86*3+3, 100+53*6+2, 86*3, 53*3+1, fill: yellow


=A0=A0 (0..8).each do |r|
=A0=A0=A0=A0=A0 stack :margin =3D>= 3 do
=A0=A0=A0=A0=A0=A0=A0=A0 flow :width =3D> 866 do
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 (0..8).each do |c|
=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 @btn[r][c] =3D button "123456789", :width =3D>= 86, :height =3D> 50
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 end # End do c
=A0=A0=A0=A0=A0=A0=A0= =A0 end # flow
=A0=A0=A0=A0=A0 end # End stack
=A0=A0 end # End do r<= br>end # app

Regards,
ashbb



--
Ruby Student
--001a11c210cc41eacd04e074d4e4--