Garry's Mod Wiki

Revision Difference

Panel:SetContentAlignment#524476

<function name="SetContentAlignment" parent="Panel" type="classfunc"> <description>Sets the alignment of the contents.</description> <realm>Client</realm> <args> <arg name="alignment" type="number">The direction of the content, based on the number pad. &amp;lt;table&amp;gt;⤶ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;<key>7</key>: **top-left**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>8</key>: **top-center**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>9</key>: **top-right**&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;⤶ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;<key>4</key>: **middle-left**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>5</key>: **center**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>6</key>: **middle-right**&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;⤶ &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;<key>1</key>: **bottom-left**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>2</key>: **bottom-center**&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;<key>3</key>: **bottom-right**&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;⤶ &amp;lt;/table&amp;gt;⤶ ⤶ <key>1</key>: **bottom-left** <br/>⤶ <key>2</key>: **bottom-center** <br/>⤶ <key>3</key>: **bottom-right** <br/>⤶ <key>4</key>: **middle-left** <br/>⤶ <key>5</key>: **center** <br/>⤶ <key>6</key>: **middle-right** <br/>⤶ <key>7</key>: **top-left** <br/>⤶ <key>8</key>: **top-center** <br/>⤶ <key>9</key>: **top-right** <br/>⤶ <image src="DLabel_SetContentAlignment.gif"/></arg> </args> </function>