<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I just started looking at the Graphical Interface Toolkit provided in the Racket Documentation.<br><br><a href="http://docs.racket-lang.org/gui/windowing-overview.html">http://docs.racket-lang.org/gui/windowing-overview.html</a><br>
</div><div><br></div><div>There was this example right in the beginning.<br></div><div><br><br><span style="font-family:courier new,monospace">(define frame (new frame%<br>                   [label "Example"]<br>
                   [width 300]<br>                   [height 300]))<br><br>(define msg (new message% <br>                    [parent frame]<br>                    [label "No events so far..."]))<br><br></span></div>
<div><span style="font-family:courier new,monospace">(define mystrng "Line1 text.... \n<br></span></div><div><span style="font-family:courier new,monospace">                 Line2 text.... \n<br></span></div><div><span style="font-family:courier new,monospace">                 Line3 text.... \n")<br>
</span></div><div><span style="font-family:courier new,monospace"><br>(new button% [parent frame]<br>             [label "Click Me"]<br>             [callback (lambda (button event)<br>                  (send msg set-label mystrng))])<br>
<br>(send frame show #t)</span><br><br></div>When I click on the button <b>Click Me</b>, it has to show <span style="font-family:courier new,monospace"><b>mystrng</b></span> like when I use <span style="font-family:courier new,monospace">draw-text</span> procedure in a canvas instead it only shows, <span style="color:rgb(0,255,0)"><span style="color:rgb(255,0,0)"><b>Line1 text...</b></span> </span>and the rest doesn't appear.<br>
<br></div></div>Menu items:<br></div>PLAY<br></div>NOTES<br></div>EXIT<br><br></div>When click on <b>NOTES</b>, it should show <span style="font-family:courier new,monospace"><b>mystrng</b></span> and this new menu should have a <b>BACK</b> button that takes me back to the Main Menu when clicked. I am having a tough time understanding the GUI Toolkit. I am guessing that I have to use something else instead of <span style="font-family:courier new,monospace"><b>set-label</b></span> in the <span style="font-family:courier new,monospace"><b>send</b> </span>procedure.<br>
<br></div><div>Is there a tutorial or a book or a link that gives some examples on this???<br><br></div><div><br></div>Best,<br></div>Zeek<br></div>