Garry's Mod Wiki

Revision Difference

Panel:SetContentAlignment#517384

<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.&#xA;&amp;amp;lt;table&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;7&lt;/key&gt;: **top-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;8&lt;/key&gt;: **top-center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;9&lt;/key&gt;: **top-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;4&lt;/key&gt;: **middle-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;5&lt;/key&gt;: **center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;6&lt;/key&gt;: **middle-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;1&lt;/key&gt;: **bottom-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;2&lt;/key&gt;: **bottom-center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;3&lt;/key&gt;: **bottom-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;/table&amp;amp;gt;</arg> <arg name="alignment" type="number">The direction of the content, based on the number pad.&#xA;&amp;amp;lt;table&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;7&lt;/key&gt;: **top-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;8&lt;/key&gt;: **top-center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;9&lt;/key&gt;: **top-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;4&lt;/key&gt;: **middle-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;5&lt;/key&gt;: **center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;6&lt;/key&gt;: **middle-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;tr&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;1&lt;/key&gt;: **bottom-left**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;2&lt;/key&gt;: **bottom-center**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;td&amp;amp;gt;&lt;key&gt;3&lt;/key&gt;: **bottom-right**&amp;amp;lt;/td&amp;amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&#xA;&amp;amp;lt;/table&amp;amp;gt;&#xA;&lt;image src=&quot;DLabel_SetContentAlignment.gif&quot;/&gt;</arg> </args> </function>