<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: (GUI) Как сделать размер окна изменяемым]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=9991</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9991&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: (GUI) Как сделать размер окна изменяемым».]]></description>
		<lastBuildDate>Tue, 23 Sep 2014 05:13:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86674#p86674</link>
			<description><![CDATA[<div class="quotebox"><cite>NektoN95 пишет:</cite><blockquote><p>О, спасибо, про GuiSize не знал. И вот еще что любопытно: возможно ли в строке Gui, Add задать размеры и координаты выражением или ссылкой на переменную?</p></blockquote></div><p>Можно, хоть частью объекта:<br /></p><div class="codebox"><pre><code>Controls := {[&quot;Sample1&quot;, &quot;x12 y10 w230 h360&quot;]: &quot;Edit&quot;
            ,[&quot;Sample2&quot;, &quot;x252 y10 w220 h360&quot;]: &quot;Edit&quot;
            ,[&quot;Exit&quot;, &quot;gGuiClose x210 y345 w80 h30&quot;]: &quot;Button&quot;}
Gui, +Resize +MinSize479x379
for k,v in Controls
   Gui, Add, % v, % k[2], % k[1]
Gui, Show, x127 y87 h379 w479, New

wRatio1 := 230/(230 + 10 + 220)   ; 10 — расстояние между полями Edit
Return

GuiClose:
ExitApp

GuiSize:
   wEdit1 := (A_GuiWidth - (479 - (230 + 10 + 220)))*wRatio1
   xEdit2 := 12 + wEdit1 + 10
   wEdit2 := A_GuiWidth - (479 - (230 + 220)) - wEdit1
   hEdit := A_GuiHeight - (410 - 360)
   xButton1 := wEdit2 - 10, yButton1 := hEdit + 15
   
   GuiControl, Move, Edit1, w%wEdit1% h%hEdit%
   GuiControl, Move, Edit2, x%xEdit2% w%wEdit2% h%hEdit%
   GuiControl, Move, Button1, x%xButton1% y%yButton1%
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Tue, 23 Sep 2014 05:13:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86674#p86674</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86672#p86672</link>
			<description><![CDATA[<p>Чтоб поменьше мельканий, можно так:<br /></p><div class="codebox"><pre><code>Gui, +Resize +MinSize479x379
Gui, Add, Edit, x12 y10 w230 h360 , Edit
Gui, Add, Edit, x252 y10 w220 h360 , Edit
Gui, Show, x127 y87 h379 w479, New

wRatio1 := 230/(230 + 10 + 220)   ; 10 — расстояние между полями Edit
Return

GuiClose:
ExitApp

GuiSize:
   wEdit1 := (A_GuiWidth - (479 - (230 + 10 + 220)))*wRatio1
   xEdit2 := 12 + wEdit1 + 10
   wEdit2 := A_GuiWidth - (479 - (230 + 220)) - wEdit1
   hEdit := A_GuiHeight - (379 - 360)
   
   GuiControl, Move, Edit1, w%wEdit1% h%hEdit%
   GuiControl, Move, Edit2, x%xEdit2% w%wEdit2% h%hEdit%
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 23 Sep 2014 04:40:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86672#p86672</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86669#p86669</link>
			<description><![CDATA[<p>О, спасибо, про GuiSize не знал. И вот еще что любопытно: возможно ли в строке Gui, Add задать размеры и координаты выражением или ссылкой на переменную?</p>]]></description>
			<author><![CDATA[null@example.com (NektoN95)]]></author>
			<pubDate>Tue, 23 Sep 2014 02:45:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86669#p86669</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86668#p86668</link>
			<description><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Затем потребуется отлавливать сообщения или периодически проверять размер окна.</p></blockquote></div><p>А почему бы не использовать встроенные метку <em>GuiSize</em> и переменные <em>A_GuiWidth</em> и <em>A_GuiHeight</em>?<br /></p><div class="codebox"><pre><code>Gui, +Resize +MinSize479x379
Gui, Add, Edit, x12 y10 w230 h360 , Edit
Gui, Add, Edit, x252 y10 w220 h360 , Edit
Gui, Show, x127 y87 h379 w479, New

wRatio1 := 230/(230 + 10 + 220)   ; 10 — расстояние между полями Edit
Return

GuiClose:
ExitApp

GuiSize:
   wEdit1 := (A_GuiWidth - (479 - (230 + 10 + 220)))*wRatio1
   xEdit2 := 12 + wEdit1 + 10
   wEdit2 := A_GuiWidth - (479 - (230 + 220)) - wEdit1
   hEdit := A_GuiHeight - (379 - 360)
   
   GuiControl, Move, Edit1, w%wEdit1%
   GuiControl, Move, Edit1, h%hEdit%
   GuiControl, Move, Edit2, x%xEdit2%
   GuiControl, Move, Edit2, w%wEdit2%
   GuiControl, Move, Edit2, h%hEdit%
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 22 Sep 2014 21:14:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86668#p86668</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86666#p86666</link>
			<description><![CDATA[<p>Для начала<br /></p><div class="codebox"><pre><code>GUI, +Resize</code></pre></div><p>Затем потребуется отлавливать сообщения или периодически проверять размер окна. Во сколько раз изменился размер окна, во столько раз изменять размеры элементов управления.</p><div class="quotebox"><blockquote><p>а так же присутствовал некоторый размер по умолчанию, меньше которого окно уменьшиться бы не могло</p></blockquote></div><div class="codebox"><pre><code>GUI, MinSize</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Mon, 22 Sep 2014 19:26:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86666#p86666</guid>
		</item>
		<item>
			<title><![CDATA[AHK: (GUI) Как сделать размер окна изменяемым]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=86662#p86662</link>
			<description><![CDATA[<div class="codebox"><pre><code>Gui, Add, Edit, x12 y10 w230 h360 , Edit
Gui, Add, Edit, x252 y10 w220 h360 , Edit
Gui, Show, x127 y87 h379 w479, New
Return

GuiClose:
ExitApp</code></pre></div><p>Как сделать так, чтобы пользователь мог изменять размер окна при наведении на его края и зажатии левой кнопки, причем так, что бы размеры полей Edit изменялись соответственно, а так же присутствовал некоторый размер по умолчанию, меньше которого окно уменьшиться бы не могло?</p>]]></description>
			<author><![CDATA[null@example.com (NektoN95)]]></author>
			<pubDate>Mon, 22 Sep 2014 18:08:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=86662#p86662</guid>
		</item>
	</channel>
</rss>
