From: Ruby Student Date: 2008-09-17T04:48:20+09:00 Subject: Re: Help with Shoes ------=_Part_46369_23196025.1221594942176 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Sep 16, 2008 at 3:13 PM, _why wrote: > On Tue, Sep 16, 2008 at 08:06:27AM +0900, Ruby Student wrote: > > The following is the modified code from calc to display the board, and > for > > which I have some questions: > > > > Shoes.app(:title => " A Humble > > Sudoku Solver ", :height => 546, :width => 617, :resizable => false) do > > background "#EEC".."#996", :radius => 5, :top => 2, :left => 2, > :width > > => -4, :height => -4 > > stack :margin => 0 do > > stack :margin => 0 > > btn = "123456789" > > flow :width => 618, :margin => 4 do > > (1..81).each do |n| > > button btn, :width => 66, :height => 66 > > end > > end > > end > > end > > > > 1) - For the title, is there some formatting to tell Shoes to center or > > left/right justified a title? > > For window titles, no. For titles on the screen, use :align => > "center". > > title "Sudoku Solver", :align => "center" > > > 2) - For the background I tried fill green right after the last " (double > > quote) but it gave me an error. How could I specified fill green, > although I > > don't really need it. > > You want the background to be green, not a gradient? > Try: background(green) > > > 3) - What purpose of :radius => 5? > > In newer versions of Shoes, this is :curve => 5. It curves the > edges of the background rectangle. > > > 4) - If you are familiar with sudoku, how do you add solid lines to > separate > > each subgroup of 3x3? > > You'll want to group the buttons each in their own slot. (A slot is > the generic name for a `stack` or `flow`.) > > Shoes.app(:title => "A Humble Sudoku Solver ", :height => 546, > :width => 640, :resizable => false) do > background green > > btn = "123456789" > 9.times do > flow :width => 206, :margin => 4 do > 9.times do > button btn, :width => 66, :height => 56 > end > end > end > end > > I don't know if this is helpful or just more confusing, but Martin > DeMello recently wrote a crossword builder. Maybe since sudoku and > crosswords are relatives, it might have some ideas you could use? > > > _why > > _why, Thank you very much for taking the time to answer my questions. It is really appreciated. I will also look and learn from Martin's crosswords puzzle. Thanks again, Ruby Student ------=_Part_46369_23196025.1221594942176--