<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Заблокировать для ввода только часть Gui]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8162&amp;type=atom" />
	<updated>2013-11-12T18:30:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8162</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77196#p77196" />
			<content type="html"><![CDATA[<p>Можно заблокировать таб, и заменить &quot;клоном&quot; контрола который не надо блокировать в этой вкладке: <br /></p><div class="codebox"><pre><code>
Gui, +HWNDhGui -DPIScale 
Gui, Color, FF8C00 
Gui, Add, Tab2, w800 h600 vTab, 1|2
Gui, Tab, 1
Gui, Add, ListBox, r19, 123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123  
Gui, Add, GroupBox, x222 y222 w444 h222  
Gui, Add, Button, xp+122 yp+180 w200 h35 gButton vButton hwndhButton, Блокировать
Gui, Show
Return

Button:
    GuiControl,, Button, % ButText := (T := !T) ? &quot;Разблокировать&quot; : &quot;Блокировать&quot;
    GuiControlGet, Pos, Pos, Button    
    GuiControl, -v, Button 
    GuiControl, Disable%T%, Tab 
    DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hButton) 
    Gui, Tab, 1
    Gui, Add, Button, x%Posx% y%Posy% w%Posw% h%Posh% vButton gButton hwndhButton, %ButText%
    Return
    
GuiEscape:
GuiClose:
    ExitApp
</code></pre></div><p>Выглядит не очень.</p><p>-----</p><p>Скрывать и показывать большие группы контролов лучше, используя другой таб в нужной вкладке первого таба (возможно заблокированного). При переключении вкладок первого таба скрывать\показывать второй таб:</p><div class="codebox"><pre><code>
Gui, +HWNDhGui -DPIScale 
Gui, Color, FF8C00 
Gui, Add, Tab2, w800 h600 vTab1 gTab1, 1|2|3
Gui, Tab, 1 
Gui, Add, ListBox, r19, 123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123|123  

Gui, Add, Tab2, xp+222 yp+222 w0 h0 vTab2, | 
Gui, Add, GroupBox, w444 h222   
Gui, Add, Button, xp+122 yp+180 w200 h35 gButton vButton, Блокировать
Gui, Show
Return

Button:
    GuiControl,, Button, % (T := !T) ? &quot;Разблокировать&quot; : &quot;Блокировать&quot; 
    GuiControl, Disable%T%, Tab1
    Return
    
Tab1:
    GuiControlGet, Tab1 
    GuiControl, % &quot;Hide&quot; (Tab1 != 1), Tab2 
    Return

GuiEscape:
GuiClose:
    ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-11-12T18:30:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77196#p77196</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70899#p70899" />
			<content type="html"><![CDATA[<p>Я вот тут подумал, а возможно ли контрол созданный для какой-то конкретной вкладки таба, на время сделать независимым от этой вкладки?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-28T17:27:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70899#p70899</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70744#p70744" />
			<content type="html"><![CDATA[<p>Если кнопка будет внутри заблокированного Tab, естественно, она окажется заблокированной. Поэтому я и не понял Вашего стремления туда её засунуть.</p><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Как понять визуально?<br />Там будет несколько элементов которые должны работать, остальные заблокированы в том числе нельзя чтоб срабатывал ТАБ. Элементы должны быть все размещены на табе, т.к. Таб на всё окно.</p></blockquote></div><p>Визуально - это так:</p><div class="codebox"><pre><code>#SingleInstance, Force
Gui, Add, Button,  x300 y500, Блокировать
Gui, Add, Button,  x300 y550, Разблокировать
Gui, Add, Tab, x10 y10 w500 h550 vMyTab, Основные|Вид|Видимость|Установки
Gui, Add, GroupBox, w444 h222 
Gui, Add, Button,  w200 h35, 111
Gui, Add, Button,  w200 h35, 222
Gui, Add, Button,  w200 h35, 333
Gui, Show
Return

ButtonБлокировать:
GUIControl, Disable, MyTab
Return

ButtonРазблокировать:
GUIControl, Enable, MyTab
Return

Esc::
GuiClose:
ExitApp</code></pre></div><p>Кнопки не принадлежат вкладке элемента Tab и расположены поверх него. Однако, я не испытывал такой способ в полной мере. На XP работает без глюков.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T16:56:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70744#p70744</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70737#p70737" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>А я всё никак не пойму, зачем кнопку блокировки размещать в самом элементе &quot;Tab&quot;.</p></blockquote></div><p>потому что больше её разместить негде.<br /></p><div class="quotebox"><blockquote><p>Вам нужно, чтобы она там была визуально, или действительно размещалась внутри вкладки элемента &quot;Tab&quot;?</p></blockquote></div><p>Как понять визуально?<br />Там будет несколько элементов которые должны работать, остальные заблокированы в том числе нельзя чтоб срабатывал ТАБ. Элементы должны быть все размещены на табе, т.к. Таб на всё окно.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T14:18:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70737#p70737</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70736#p70736" />
			<content type="html"><![CDATA[<p>Вы хотите заблокировать сразу много элементов управления (контролов) нажатием одной кнопки в окне GUI. Сделать это напрямую почему-то тяжело/невозможно. Поэтому Вы стремитесь разместить контролы на вкладке элемента &quot;Tab&quot;, чтобы можно было их заблокировать одним махом.</p><p>А я всё никак не пойму, зачем кнопку блокировки размещать в самом элементе &quot;Tab&quot;. Какой от этого прок? И вообще, Вам нужно, чтобы она там была визуально, или действительно размещалась внутри вкладки элемента &quot;Tab&quot;?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T14:09:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70736#p70736</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70732#p70732" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Да вы так сильно не напрягайтесь, если не смогли понять суть задачи. <br />У меня тоже такая картинка есть в коллекции.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T13:13:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70732#p70732</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70731#p70731" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>На табе должна находится кнопка!</p></blockquote></div><p><span class="postimg"><img src="http://ic.pics.livejournal.com/kryworuchko93/61177386/3295/3295_300.jpg" alt="http://ic.pics.livejournal.com/kryworuchko93/61177386/3295/3295_300.jpg" /></span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T13:06:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70731#p70731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70725#p70725" />
			<content type="html"><![CDATA[<p>На табе должна находится кнопка! <br />И ещё DropDownList и кнопка.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T10:38:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70725#p70725</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70724#p70724" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Чтобы на вашем примере кнопка &quot;Блокировать&quot; оставалась неблокированной</p></blockquote></div><p>Вуаля!</p><div class="codebox"><pre><code>#SingleInstance, Force
Gui, Add, Button,  , Блокировать
Gui, Add, Button,  , Разблокировать
Gui, Add, Tab, w500 h550 vMyTab, Основные|Вид|Видимость|Установки
Gui, Add, GroupBox, w444 h222 
Gui, Add, Button,  w200 h35, 111
Gui, Add, Button,  w200 h35, 222
Gui, Add, Button,  w200 h35, 333
Gui, Show
Return

ButtonБлокировать:
GUIControl, Disable, MyTab
Return

ButtonРазблокировать:
GUIControl, Enable, MyTab
Return

Esc::
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T10:33:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70724#p70724</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70723#p70723" />
			<content type="html"><![CDATA[<p>Чтобы на вашем примере кнопка &quot;Блокировать&quot; оставалась неблокированной</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T10:11:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70723#p70723</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70722#p70722" />
			<content type="html"><![CDATA[<p>Теперь уже не представляю, чего Вы хотите... В первом сообщении кнопка &quot;Заблокировать&quot; находится внутри вкладки, которую она блокирует. Неудивительно, что при этом блокируется сама кнопка.</p><p>Сформулируйте вопрос чётко и однозначно.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T10:05:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70722#p70722</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70721#p70721" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Я дал готовый код на заданный вопрос.</p></blockquote></div><p>Ну <em>GUIControl, Disable, MyTab</em> конечно не стандартное решение <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Контролами можно управлять командой GUIControl.</p></blockquote></div><p>Так как их разблокировать для пользователя при заблокированном Tab`е?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T08:58:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70721#p70721</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70719#p70719" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Ну, это можно (c)</p></blockquote></div><p>Но не нужно. Как мне после этого управлять нужными мне контролами?</p></blockquote></div><p>Как это - не нужно? Я дал готовый код на заданный вопрос.<br />Контролами можно управлять командой <em>GUIControl</em>.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T08:52:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70719#p70719</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70717#p70717" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Ну, это можно (c)</p></blockquote></div><p>Но не нужно. Как мне после этого управлять нужными мне контролами?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T08:40:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70717#p70717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Заблокировать для ввода только часть Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70716#p70716" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Так это догадки насчёт быстродейтвия или Вы проверяли?</p></blockquote></div><p>Хорошо, как отключить Таб?</p></blockquote></div><p>Ну, это можно (c)</p><div class="codebox"><pre><code>#SingleInstance, Force
Gui, Add, Tab, w500 h550 vMyTab, Основные|Вид|Видимость|Установки
Gui, Add, GroupBox, x22 y22 w444 h222 
Gui, Add, Button,  w200 h35, 111
Gui, Add, Button,  w200 h35 , 222
Gui, Add, Button,  w200 h35 , 333
Gui, Add, Button, xp+122 yp+180 w200 h35 gButton vButton, Блокировать
Gui, Show
Return

Button:
GUIControl, Disable, MyTab
Return

Esc::
GuiClose:
ExitApp </code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-03-24T08:36:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70716#p70716</id>
		</entry>
</feed>
