擅长:python、mysql、java
<p>不能将小部件放在其父级之下。根据<a href="http://tcl.tk/man/tcl8.5/TkCmd/raise.htm" rel="nofollow">official tk docs</a>:</p>
<blockquote>
<p>If the aboveThis argument is omitted then the command raises window so
that it is above all of its siblings in the stacking order (it will
not be obscured by any siblings and will obscure any siblings that
overlap it). If aboveThis is specified then it must be the path name
of a window that is either a sibling of window or the descendant of a
sibling of window. In this case the raise command will insert window
into the stacking order just above aboveThis (or the ancestor of
aboveThis that is a sibling of window); this could end up either
raising or lowering window.</p>
</blockquote>
<p>(注:。tk<code>raise</code>命令是<code>lift()</code>在最低级别实际调用的命令)</p>
<p>要获得所需的效果,请使帧和列表框同级,然后使用<code>in_</code>参数将列表框打包到帧中:</p>
<pre><code>food.grid(row=0, column=1, in_=frame)
pythons.grid(row=1, column=1, pady=10, in_=frame)
</code></pre>