<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI и динамический Drop Down List]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10412&amp;type=atom" />
	<updated>2015-02-17T04:38:47Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10412</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91623#p91623" />
			<content type="html"><![CDATA[<p>Всем спасибо, все решено.</p>]]></content>
			<author>
				<name><![CDATA[to4er]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32506</uri>
			</author>
			<updated>2015-02-17T04:38:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91623#p91623</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91614#p91614" />
			<content type="html"><![CDATA[<p>Вот более простой для понимания пример, по-моему:<br /></p><div class="codebox"><pre><code>oLists := { Товары: &quot;Фрукты||Овощи&quot;
          , Фрукты: &quot;Яблоки||Груши&quot;, Овощи: &quot;Огурцы||Помидоры&quot;
          , Яблоки: &quot;Антоновка||Гольден|Мельба&quot;, Груши: &quot;Дюшес||Велеса|Московская&quot;
          , Огурцы: &quot;Конни||Патти|Клавдия&quot;, Помидоры: &quot;Аурия||Балерина|Будёновка&quot; }

Gui, Margin, 25, 12
Gui, Add, DDL, vGoods gHandling, % oLists.Товары
Gui, Add, DDL, vGroups gHandling, % oLists.Фрукты
Gui, Add, DDL, vSort gHandling, % oLists.Яблоки
Gui, Show
Return

Handling:
   Gui, Submit, NoHide
   if (A_GuiControl = &quot;Goods&quot;)  {
      GuiControl,, Groups, % &quot;|&quot; oLists[Goods]
      Gui, Submit, NoHide
      GuiControl,, Sort, % &quot;|&quot; oLists[Groups]
   }
   else if (A_GuiControl = &quot;Groups&quot;)
      GuiControl,, Sort, % &quot;|&quot; oLists[Groups]
   else
      MsgBox, % Sort
   Return
   
GuiClose:
   ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-02-16T18:13:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91614#p91614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91613#p91613" />
			<content type="html"><![CDATA[<p>Если мы в Гуи указываем AltSubmit, То комманда&nbsp; GuiControlGet возвращает номер выбора.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-02-16T17:02:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91613#p91613</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91612#p91612" />
			<content type="html"><![CDATA[<p>Какая переменная тут отвечает за вывод результата? Что-то я совсем запутался..</p>]]></content>
			<author>
				<name><![CDATA[to4er]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32506</uri>
			</author>
			<updated>2015-02-16T17:00:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91612#p91612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91611#p91611" />
			<content type="html"><![CDATA[<p>Да, тогда так:<br /></p><div class="codebox"><pre><code>Parent := &quot;first|second&quot;
Choice_1 := &quot;A|B|C&quot;
Choice_1_1 := &quot;1|2|3&quot;
Choice_1_2 := &quot;4|5&quot;
Choice_1_3 := &quot;6&quot;
Choice_2 := &quot;D|E&quot;
Choice_2_1 := &quot;s1|s2|s3&quot;
Choice_2_2 := &quot;s4|s5&quot;


Gui Add, DropDownList, AltSubmit vList1 gListChange1 Choose1, %Parent%
Gui Add, DropDownList, AltSubmit vList2 gListChange2 Choose1, %Choice_1%
Gui Add, DropDownList, AltSubmit vList3 Choose1, %Choice_1_1%
Gui Show
Return

ListChange1:
GuiControlGet, List1
GuiControl,, List2, % &quot;|&quot; Choice_%List1%
GuiControl, Choose, List2, 1
GuiControlGet, List2
GuiControl,, List3, % &quot;|&quot; Choice_%List1%_%List2%
GuiControl, Choose, List3, 1
Return

ListChange2:
GuiControlGet, List1
GuiControlGet, List2 
GuiControl,, List3, % &quot;|&quot; Choice_%List1%_%List2%
GuiControl, Choose, List3, 1
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-02-16T16:50:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91611#p91611</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91610#p91610" />
			<content type="html"><![CDATA[<p>Спасибо, только данный скрипт не позволяет запрещенные символы вставлять в списки, что не очень удобно. Я, в принципе, с первым разобрался, если б еще 3 DDL в нем вместо двух было б шикарно.</p>]]></content>
			<author>
				<name><![CDATA[to4er]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32506</uri>
			</author>
			<updated>2015-02-16T16:48:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91610#p91610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91608#p91608" />
			<content type="html"><![CDATA[<p>Например так:<br /></p><div class="codebox"><pre><code>Parent := &quot;first|second&quot;
Choice_first := &quot;A|B|C&quot;
Choice_first_A := &quot;1|2|3&quot;
Choice_first_B := &quot;4|5&quot;
Choice_first_C := &quot;6&quot;
Choice_second := &quot;D|E&quot;
Choice_second_D := &quot;s1|s2|s3&quot;
Choice_second_E := &quot;s4|s5&quot;


Gui Add, DropDownList, vList1 gListChange1 Choose1, %Parent%
Gui Add, DropDownList, vList2 gListChange2 Choose1, %Choice_first%
Gui Add, DropDownList, vList3 Choose1, %Choice_first_A%
Gui Show
Return

ListChange1:
GuiControlGet, List1 
GuiControl,, List2, % &quot;|&quot; Choice_%List1%
GuiControl, Choose, List2, 1
GuiControlGet, List2
GuiControl,, List3, % &quot;|&quot; Choice_%List1%_%List2%
GuiControl, Choose, List3, 1
Return

ListChange2:
GuiControlGet, List1 
GuiControlGet, List2 
GuiControl,, List3, % &quot;|&quot; Choice_%List1%_%List2%
GuiControl, Choose, List3, 1
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-02-16T15:53:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91608#p91608</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91603#p91603" />
			<content type="html"><![CDATA[<p>Ув. Irbis, у меня что-то не получается + там еще пару вопросов, загляните, пожалуйста, в лс.<br />В общем, такая конструкция, и там 3 списка, один главный - управляет вторым, а второй - третьим. Пытался встроить ваш код, но у меня криво как-то выходит. Списки не разворачиваются, кнопки не работают.<br /></p><div class="codebox"><pre><code>Gui, TestGUI:Add, DropDownList, x155 y15 w95 h21, Родительский список
Gui, TestGUI:Add, DropDownList, x10 y15 w135 h21, Список среднего уровня
Gui, TestGUI:Add, DropDownList, x10 y45 w135 h21, Список нижнего уровня
Gui, TestGUI:Add, DropDownList, x10 y75 w135 h21, DropDownList
Gui, TestGUI:Add, DropDownList, x10 y105 w135 h21, DropDownList
Gui, TestGUI:Add, Button, x155 y45 w95 h40, OK
Gui, TestGUI:Add, Button, x155 y90 w95 h40, Exit
Gui, TestGUI:Add, Text, x10 y130 w21 h13, Text
Gui, TestGUI:Show, w260 h146, TestGUI
Return
ButtonOK:
ButtonExit:
TestGUIGuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[to4er]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32506</uri>
			</author>
			<updated>2015-02-16T12:53:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91603#p91603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91602#p91602" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Arr := {&quot;Дом&quot; : &quot;|Кирпич||Дерево|Панель&quot;
       ,&quot;Машина&quot; : &quot;|Седан||Джип|Пикап&quot;
       ,&quot;Животное&quot; : &quot;|Кот||Собака|Единорог&quot;}
for k in Arr
  mainList .= k &quot;|&quot;
Gui, Add, DropDownList, gmainCh vChoice Choose1 xm, % mainList
Gui, Add, DropDownList, vList gsubCh x+m
Gui, Add, Button, Default w50 h50 xm y+20, OK
Gui, Add, Button, w50 h50 xp+202, Exit
Gosub mainCh
Gui, Show
Return

mainCh:
   GuiControlGet,Choice,, Choice
   GuiControl,, List, % Arr[Choice]
Return

SubCh:
   GuiControlGet, subCh,, List
   tooltip % SubCh
   sleep 700
   tooltip
Return
ButtonOK:
   GuiControlGet, subCh,, List
   MsgBox % subCh
Return
ButtonExit:
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2015-02-16T10:57:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91602#p91602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91601#p91601" />
			<content type="html"><![CDATA[<p>Командой <em>GuiControl</em>. Русского перевода нет.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2015-02-16T10:29:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91601#p91601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: GUI и динамический Drop Down List]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91600#p91600" />
			<content type="html"><![CDATA[<p>Как сделать, чтобы в одном GUI опции одного DDL зависели от другого, родительского DDL? То есть, в первом DDL, примеру выбор: Овощи|Фрукты, во втором в зависимости от выбора первого либо: Огурцы|Помидоры , либо Яблоки|Груши ?</p>]]></content>
			<author>
				<name><![CDATA[to4er]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32506</uri>
			</author>
			<updated>2015-02-16T09:04:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91600#p91600</id>
		</entry>
</feed>
