Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 2350

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>4.4 Using Anchors for Widgets</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node17.html#section.geometry.grid">&lt;&lt; Prev</A></TD><TD><A href="node14.html">- Up -</A></TD></TR></TABLE><DIV id="section.geometry.anchor"><H2><A name="section.geometry.anchor">4.4 Using Anchors for Widgets</A></H2><P> <A name="label203"></A> The <CODE>anchor</CODE> option for the packer and the <CODE>sticky</CODE> option for the grid geometry manager determine where the widget is placed in its parcel. In the same way several kind of widgets, e.&nbsp;g., message and label widgets, take an anchor <CODE>option</CODE>, which determines where the displayed item, e.&nbsp;g., the text or bitmap, is placed within the widget. </P><P> <A href="node18.html#figure.geometry.widget-anchor">Figure&nbsp;4.11</A> shows an example for the three label widgets used throughout <A href="node16.html#section.geometry.pack">Section&nbsp;4.2</A>. The possible values for the anchor options are the same as described in <A href="node16.html#section.geometry.anchors">Section&nbsp;4.2.3</A>. </P><DIV id="figure.geometry.widget-anchor"><HR><P><A name="figure.geometry.widget-anchor"></A></P><P> </P><DIV align="center"><IMG alt="" src="widget-anchor.gif"></DIV><P> </P><DL class="anonymous"><DD class="code"><CODE>[L1&nbsp;L2&nbsp;L3]={NewLabels}<BR>{Tk<SPAN class="keyword">.</SPAN>send&nbsp;pack(L1&nbsp;L2&nbsp;L3&nbsp;fill:x)}<BR>{L1&nbsp;tk(configure&nbsp;anchor:w)}&nbsp;&nbsp;<BR>{L3&nbsp;tk(configure&nbsp;anchor:e)}</CODE></DD></DL><P> </P><P class="caption"><STRONG>Figure&nbsp;4.11:</STRONG> Widgets with <CODE>anchor</CODE> options.</P><HR></DIV><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node17.html#section.geometry.grid">&lt;&lt; Prev</A></TD><TD><A href="node14.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>