<pre><span>You could draw/animate your own green button using the drawing toolkit.<br><br>sort of like this 1-d scatter thingy<br><br>;  make new widget&#39;scatter-chart%&#39;<br></span><span>;; do this all in Pretty Big language (DrScheme only)<br>

</span>(<span>define</span> <span>scatter-chart%</span> (<span>class</span> <span>pane%</span> ()<br>                         (<span>init-field</span> <span>parent</span>)<br>
                         <span>; Make the drawing area<br></span>                         (<span>super-instantiate</span> () (<span>parent</span> <span>parent</span>) <span>; instantiate this FIRST<br>
</span>                           [<span>min-width</span> <span>100</span>] [<span>stretchable-width</span> <span>#f</span>]<br>                           (<span>min-height</span> <span>200</span>) [<span>stretchable-height</span> <span>#f</span>])<br>

                         <br>                         <span>;; internal data<br></span>                         (<span>define</span> <span>list-of-points</span> <span>&#39;</span>()) <span>;; start with empty list<br>
</span>                         (<span>define</span> <span>canvas</span> (<span>new</span> <span>canvas%</span> [<span>parent</span> <span>this</span>]  <br>
                                             (<span>paint-callback</span> (<span>lambda</span> (<span>canvas</span> <span>dc</span>) (<span>draw-chart</span>)))<br>
                                             [<span>min-width</span> <span>100</span>] [<span>stretchable-width</span> <span>#f</span>]<br>                                             [<span>min-height</span> <span>200</span>] [<span>stretchable-height</span> <span>#f</span>]<br>

                                             ))<br>                         (<span>define</span> <span>dc</span> (<span>send</span> <span>canvas</span> <span>get-dc</span>)) <span>; Get the canvas&#39;s drawing context<br>

</span>                         <span>; Make some pens and brushes for use later<br></span>                         (<span>define</span> <span>no-pen</span> (<span>make-object</span> <span>pen%</span> <span>&quot;BLACK&quot;</span> <span>1</span> <span>&#39;</span><span>transparent</span>))<br>

                         (<span>define</span> <span>blue-brush</span> (<span>make-object</span> <span>brush%</span> <span>&quot;BLUE&quot;</span> <span>&#39;</span><span>solid</span>))<br>
                         (<span>define</span> <span>yellow-brush</span> (<span>make-object</span> <span>brush%</span> <span>&quot;YELLOW&quot;</span> <span>&#39;</span><span>solid</span>))<br>
                         <br>                         <span>;; public methods<br></span>                         <span>;; add-point : new-point<br></span>                         (<span>define/public</span> (<span>add-point</span> <span>new-point</span>)<br>

                           (<span>set!</span> <span>list-of-points</span> (<span>cons</span> <span>new-point</span> <span>list-of-points</span>)) <span>;; add to the list<br>
</span>                           (<span>send</span> <span>dc</span> <span>draw-rectangle</span> <span>0</span> <span>new-point</span> <span>200</span> <span>1</span>)) <span>;; and draw the line<br>
</span>                         <span>;; draw-chart : draw a chart based on the list of integers supplied<br></span>                         <span>;; see <a href="http://download.plt-scheme.org/doc/371/html/mred/mred-Z-H-397.html" target="_blank">http://download.plt-scheme.org/doc/371/html/mred/mred-Z-H-397.html</a><br>

</span>                         (<span>define/public</span> (<span>draw-chart</span>)<br>                           (<span>send</span> <span>dc</span> <span>set-pen</span> <span>no-pen</span>)<br>
                           (<span>send</span> <span>dc</span> <span>set-brush</span> <span>blue-brush</span>)<br>                           (<span>send</span> <span>dc</span> <span>draw-rectangle</span> <span>0</span> <span>0</span> <span>100</span> <span>200</span>)  <span>; big blue rectangle<br>

</span>                           (<span>send</span> <span>dc</span> <span>set-brush</span> <span>yellow-brush</span>)<br>                           (<span>map</span><br>
                            (<span>lambda</span> (<span>y</span>) (<span>send</span> <span>dc</span> <span>draw-rectangle</span> <span>0</span> <span>y</span> <span>200</span> <span>1</span>)) <span>; draw a line for each integer.<br>

</span>                            <span>list-of-points</span> ))<br>                         (<span>draw-chart</span>))) <span>; draw it for the first time when this class is instantiated<br>
</span><br><span>; Make a  frame<br></span>(<span>define</span> <span>frame</span> (<span>new</span> <span>frame%</span> [<span>label</span> <span>&quot;scatter-chart% Example&quot;</span>] [<span>width</span> <span>100</span>] [<span>height</span> <span>200</span>]))<br>

<br><span>; Show the frame<br></span>(<span>send</span> <span>frame</span> <span>show</span> <span>#t</span>)<br><span>; Wait a second to let the window get ready<br>
</span><span>;(sleep/yield 1)<br></span>(<span>define</span> <span>new-my-widget</span> (<span>new</span> <span>scatter-chart%</span> (<span>parent</span> <span>frame</span>) ))  <span>; instantiate the widget in the frame<br>

</span>(<span>define</span> <span>new-his-widget</span> (<span>new</span> <span>scatter-chart%</span> (<span>parent</span> <span>frame</span>) )) <span>; make another one<br>
</span><br>(<span>send</span> <span>new-my-widget</span> <span>draw-chart</span>)<br><span>; Draw the face<br></span>(<span>define</span> (<span>go</span>) <br>
  (<span>map</span> (<span>lambda</span> (<span>y</span>)<br><br><br><br>       (<span>send</span> <span>new-my-widget</span> <span>add-point</span> <span>y</span>) <span>; add a point at a time<br>
</span>         (<span>sleep/yield</span> <span>0.05</span>)) <span>; draw it slowly<br></span>       <span>&#39;</span>(<span>10</span> <span>30</span> <span>22</span> <span>77</span> <span>78</span> <span>79</span> <span>17</span> <span>65</span> <span>97</span> <span>54</span> <span>55</span> <span>56</span> <span>57</span> <span>91</span> <span>33</span> <span>55</span> <span>95</span> <span>99</span> <span>125</span> <span>155</span> <span>157</span> <span>159</span> <span>188</span> <span>187</span> <span>186</span> <span>191</span>))) <span>;; list of datapoints<br>

</span><br>(<span>go</span>)  <span>;; !!!</span></pre><br><br><div class="gmail_quote">On Sun, Mar 30, 2008 at 5:49 AM, Ben Simon &lt;<a href="mailto:benjisimon@gmail.com" target="_blank">benjisimon@gmail.com</a>&gt; wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Mon, Mar 10, 2008 at 9:22 AM, Matthew Flatt &lt;<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>&gt; wrote:<br>

</div><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div>At Sun, 9 Mar 2008 23:45:03 -0400, &quot;Ben Simon&quot; wrote:<br>
&gt; How do I style MrEd components? That is, how could I make a button red, or a<br>
&gt; border green? &nbsp;I see where I can make use of different fonts, but that&#39;s<br>
&gt; about all I see in terms of controlling the Look &amp; Feel of the components.<br></div>[...useful comments trimmed]</div></blockquote><div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div><br></div>More generally, you can derive a sub-class of `canvas%&#39; and draw<br>
anything as a control.<br>
<font color="#888888"></font></blockquote><br></div>There doesn&#39;t happen to be a way to use this approach, and somehow embed a container like a vertical-panel% in the resulting canvas%, is there?<br><br>The idea being that I might make a component that uses a canvas to draw a green border, and then embed other GUI components (say, a series of buttons) in this newly drawn area.<br>


<br>I&#39;ve poked around the docs and don&#39;t see a way to do it, but I thought I should get confirmation from the pros.<br><br>-Ben<br></div><font color="#888888"><br clear="all"><br>-- <br>Have an idea for software? I can make it happen - <a href="http://www.ideas2executables.com" target="_blank">http://www.ideas2executables.com</a><br>


My Blog: <a href="http://benjisimon.blogspot.com" target="_blank">http://benjisimon.blogspot.com</a>
</font><br>_________________________________________________<br>
 &nbsp;For list-related administrative tasks:<br>
 &nbsp;<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br><br>Stephen<br><br>--<br>Stephen De Gabrielle<br><a href="mailto:s.degabrielle@ucl.ac.uk" target="_blank">s.degabrielle@ucl.ac.uk</a><br>Telephone +44 (0)20 7679 5242 (x45242)<br>

Mobile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;079 851 890 45<br>Project: Making Sense of Information (MaSI)<br><a href="http://www.uclic.ucl.ac.uk/annb/MaSI.html" target="_blank">http://www.uclic.ucl.ac.uk/annb/MaSI.html</a><br><br>UCLIC: University College London Interaction Centre<br>

<a href="http://www.uclic.ucl.ac.uk/" target="_blank">http://www.uclic.ucl.ac.uk/</a><br><br>Remax House - 31/32 Alfred Place<br>London - WC1E 7DP