<?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=11018</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11018&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Удаление Gui элементов».]]></description>
		<lastBuildDate>Wed, 28 Oct 2015 12:47:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98391#p98391</link>
			<description><![CDATA[<p>Вдогонгку - на англоязычном сайте анонсирована разработка эл. упр. «Tab3»: <a href="http://www.autohotkey.com/boards/viewtopic.php?f=24&amp;t=9549">New test builds - Tab3 control, Menu improvements, LoadPicture, new vars</a>. Борются с недочётами при перерисовке окна.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 28 Oct 2015 12:47:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98391#p98391</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98062#p98062</link>
			<description><![CDATA[<p>Вот это вообще круто!!! То что надо... Спасибо Вам огромное!!! Так и сделаем!</p>]]></description>
			<author><![CDATA[null@example.com (Strongest)]]></author>
			<pubDate>Wed, 21 Oct 2015 12:01:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98062#p98062</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98060#p98060</link>
			<description><![CDATA[<p>Тогда на скорую руку так:<br /></p><div class="codebox"><pre><code>
GuiNames := {}
Gui, 1:-DPIScale
Gui, 1: Margin, 0, 0
Gui, 1:Add, Tab2, h300 w500 vMainTable gMainTable Wrap HWNDhTab, % PageMass := &quot;Главная|&quot;  
Gui, 1:Add, ListView, gRequestList r5 x90 y60 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;)
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot;)
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot;)
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot;)
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot;)   
Loop % LV_GetCount() 
    LV_GetText(Text, A_Index), GuiNames[Text] := &quot;Item&quot; A_Index  
Gui, 1:Show 
Return
     
MainTable:
    GuiControlGet, MainTable
    Loop % LV_GetCount()
    {
        LV_GetText(RowText, A_Index), RowNumber := &quot;&quot;
        If (MainTable = RowText &amp;&amp; (RowNumber := A_Index))
            Break
    }
    Name := GuiNames[MainTable]
    If (Name != GuiName)
        Gui, %GuiName%:Show, Hide
    If Name
        Gui, % (GuiName := Name) &quot;:Show&quot;, NA
    Return
    
RequestList:
    If A_GuiEvent != DoubleClick
        Return
    If !(RowNumber := LV_GetNext(0, &quot;F&quot;))
        Return
    LV_GetText(MainTable, RowNumber)
    If InStr(&quot;|&quot; PageMass, &quot;|&quot; MainTable &quot;|&quot;)
    {
        GuiControl, 1:Choose, MainTable, % MainTable
        Gui, % (GuiName := GuiNames[MainTable]) &quot;:Show&quot;, NA
        Return
    }
    GuiControl, 1:, MainTable, % MainTable
    GuiControl, 1:Choose, MainTable, %MainTable%  
    PageMass .= MainTable &quot;|&quot;, GuiName := GuiNames[MainTable]
    
    Gui, %GuiName%: +Parent%hTab% -Caption -DPIScale
    Loop 4
    {
        LV_GetText(Text, RowNumber, A_Index + 1)
        Gui, %GuiName%:Add, Text, % &quot;x30 y&quot; A_Index*30 &quot; w60 vMyEdit&quot; GuiName &quot;_&quot; A_Index, % Text
    }
    Gui, %GuiName%:Add, Button, xp y+30 gClose, Закрыть
    Gui, %GuiName%:Show, NA x0 y30 h270 w500
    Gui, 1:Show 
    Return

Close:  
    GuiControl, 1:, MainTable, % &quot;|&quot; PageMass := StrReplace(PageMass, &quot;|&quot; MainTable &quot;|&quot;, &quot;|&quot;)  
    Gui, % (GuiName := GuiNames[MainTable]) &quot;:Destroy&quot;
    Return
</code></pre></div><p>|</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Wed, 21 Oct 2015 09:45:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98060#p98060</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98056#p98056</link>
			<description><![CDATA[<p>Спасибо большое.<br />Очень хороший способ, буду пробовать его влипать в свой код, но чет кажется вряд ли получится, во вкладке много элементов, и из них еще вызывается несколько окон и т.д. Еще понравилась идея создавать новое окно и как не будь его прилепить к основному, а затем его удалять полностью..</p>]]></description>
			<author><![CDATA[null@example.com (Strongest)]]></author>
			<pubDate>Wed, 21 Oct 2015 08:35:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98056#p98056</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98045#p98045</link>
			<description><![CDATA[<p>Рабочий вариант, можно показывать блок контролов.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
Gui, 1:+LastFound -DPIScale
Loop 5 
    Gui, 1:Add, Text, % &quot;Hidden x20 y&quot; A_Index*30 &quot; w60 vMyEdit&quot; A_Index 
Gui, 1:Add, Button, Hidden x20 y200 w140 h24 gClose vClose, Закрыть

Gui, 1:Add, Tab2, x0 y0 h20 w800 vMainTable gMainTable wrap, % PageMass := &quot;Главная|&quot; 
Gui, 1:Tab, 1
Gui, 1:Add, ListView, vRequestList gRequestList r5 x40 y40 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;)
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot;)
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot;)
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot;)
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot;)
Gui, 1:Show, w500 h300
Return 
     
MainTable:
    GuiControlGet, MainTable   
    Loop % LV_GetCount()
    {
        LV_GetText(RowText, A_Index), RowNumber := &quot;&quot;
        If (MainTable = RowText &amp;&amp; (RowNumber := A_Index))
            Break
    }
    BlockShow(!!RowNumber)
    If RowNumber
        BlockPaste(RowNumber) 
    Return
    
RequestList:
    If A_GuiEvent != DoubleClick
        Return
    If !(RowNumber := LV_GetNext(0, &quot;F&quot;))
        Return
    LV_GetText(NameTab, RowNumber, 1) 
    If InStr(&quot;|&quot; PageMass, &quot;|&quot; NameTab &quot;|&quot;) 
        Return 
    PageMass .= NameTab &quot;|&quot;
    GuiControl,, MainTable, %NameTab%
    GuiControl, Choose, MainTable, %NameTab% 
    BlockPaste(RowNumber) 
    BlockShow(1)
    Return
    
Close:  
    GuiControl,, MainTable, % &quot;|&quot; PageMass := RegExReplace(PageMass, &quot;\|&quot; MainTable &quot;\|&quot;, &quot;|&quot;)
    BlockShow(0)
    Return    
    
BlockShow(Show) {
    Loop 5
        GuiControl, Show%Show%, MyEdit%A_Index% 
    GuiControl, Show%Show%, Close
}

BlockPaste(RowNumber) {
    Loop 5 
    {
        LV_GetText(ForMyEdit, RowNumber, A_Index)
        GuiControl, , MyEdit%A_Index%, % ForMyEdit  
    } 
}
</code></pre></div></div></div><p>Нет, лучше встроить блок контролов во второй таб.<br /></p><div class="codebox"><pre><code>
Gui, 1:-DPIScale
Gui, 1: Margin, 0, 0
Gui, 1:Add, Tab2, h300 w500 vMainTable gMainTable Wrap, % PageMass := &quot;Главная|&quot;  
Gui, 1:Add, ListView, gRequestList r5 x90 y60 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;)
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot;)
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot;)
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot;)
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot;) 
Gui, 1:Add, Tab2, w0 h0 vHiddenTab Hidden, |
Loop 4
    Gui, 1:Add, Text, % &quot;xm+30 y&quot; A_Index*30+30 &quot; w60 vMyEdit&quot; A_Index
Gui, 1:Add, Button, xp y+30 gClose, Закрыть
Gui, 1:Show
Return
     
MainTable:
    GuiControlGet, MainTable   
    Loop % LV_GetCount()
    {
        LV_GetText(RowText, A_Index), RowNumber := &quot;&quot;
        If (MainTable = RowText &amp;&amp; (RowNumber := A_Index))
            Break
    }  
    BlockPaste(RowNumber) 
    Return
    
RequestList:
    If A_GuiEvent != DoubleClick
        Return
    If !(RowNumber := LV_GetNext(0, &quot;F&quot;))
        Return
    LV_GetText(NameTab, RowNumber) 
    If InStr(&quot;|&quot; PageMass, &quot;|&quot; NameTab &quot;|&quot;) 
        Return 
    GuiControl, 1:, MainTable, % MainTable := NameTab 
    GuiControl, 1:Choose, MainTable, %MainTable% 
    BlockPaste(RowNumber), PageMass .= MainTable &quot;|&quot;
    Return

Close:  
    GuiControl, 1:, MainTable, % &quot;|&quot; PageMass := StrReplace(PageMass, &quot;|&quot; MainTable &quot;|&quot;, &quot;|&quot;) 
    GuiControl, 1:Show0, HiddenTab
    Return     

BlockPaste(RowNumber) {
    Loop % 4 * (!!RowNumber)
    {
        LV_GetText(ForMyEdit, RowNumber, A_Index + 1) 
        GuiControl, 1:, MyEdit%A_Index%, % ForMyEdit  
    } 
    GuiControl, % &quot;1:Show&quot; (!!RowNumber), HiddenTab
}
</code></pre></div><p>Если по ходу работы, в ListView будут производится изменения, и не будут добавлятся колонки, то изменения будут отображатся во вкладках.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 20 Oct 2015 23:24:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98045#p98045</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98044#p98044</link>
			<description><![CDATA[<p>Да, удаления элементов управления не существует.<br />При визуальном удалении вкладок элементы управления остаются висеть в памяти, жёстко привязанные к порядковому номеру вкладки.</p><p>Можно вместо вкладок использовать несколько GUI и команду <em>GUI, Destroy</em>. Окна GUI как-нибудь прикрепить к основному окну.</p><div class="codebox"><pre><code>Gui, 1:Add, ListView, vRequestList gRequestList r5 x40 y40 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot; )
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot; )
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot; )
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot; )
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot; )
Gui, 1: Add, tab2, vMyTab
GUI,1: Show
Return



RequestList:
    SNumber := LV_GetNext( &quot;Focused&quot; )
    RowNumber := LV_GetNext( 0, &quot;F&quot; )
    if not RowNumber
        Return
    
    if A_GuiEvent = DoubleClick
    {
        LV_GetText( NameTab, RowNumber , 1 )
    LV_GetText( ForMyEdit1, RowNumber , 1 )
    GuiControl,, MyTab, %ForMyEdit1%
    Gui, 2:Add, Button, x20 y200 w140 h24, Закрыть
    Gui, 2:Show
    }
Return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 20 Oct 2015 23:05:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98044#p98044</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98043#p98043</link>
			<description><![CDATA[<p>Кривой вариант если вкладки удалять с &quot;конца&quot;, то так:<br /></p><div class="codebox"><pre><code>
Gui, 1:Add, Tab2, x0 y0 h20 w800 vMainTable gMainTable wrap, % PageMass := &quot;Главная|&quot; 
Gui, 1:Tab, 1
Gui, 1:Add, ListView, vRequestList gRequestList r5 x40 y40 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;)
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot;)
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot;)
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot;)
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot;)
Gui, 1:Show, w500 h300 xCenter yCenter
Return 
     
MainTable:
    GuiControlGet, MainTable
    Return
 
RequestList:
    If A_GuiEvent != DoubleClick
        Return
    If !(RowNumber := LV_GetNext(0, &quot;F&quot;)) 
        Return 
    LV_GetText(NameTab, RowNumber, 1) 
    If InStr(&quot;|&quot; PageMass, NameTab)
    {
        GuiControl, Choose, MainTable, %NameTab%
        Return
    }    
    PageMass .= NameTab &quot;|&quot;
    GuiControl,, MainTable, %NameTab%
    GuiControl, Choose, MainTable, %NameTab%
    Gui, Tab, %NameTab%,, Exact
    Loop 5 
        LV_GetText(ForMyEdit%A_Index%, RowNumber, A_Index)
    Gui, 1:Add, Text, x20 y30 w60 HWNDhMyEdit1%NameTab%, % ForMyEdit1
    Gui, 1:Add, Text, x20 y60 w60 HWNDhMyEdit2%NameTab%, % ForMyEdit2
    Gui, 1:Add, Text, x20 y90 w60 HWNDhMyEdit3%NameTab%, % ForMyEdit3
    Gui, 1:Add, Text, x20 y120 w60 HWNDhMyEdit4%NameTab%, % ForMyEdit4
    Gui, 1:Add, Text, x20 y150 w60 HWNDhMyEdit5%NameTab%, % ForMyEdit5
    Gui, 1:Add, Button, x20 y200 w140 h24 gClose HWNDhClose%NameTab%, Закрыть
    Return
    
Close: 
    GuiControlGet, MainTable 
    PageMass := RegExReplace(PageMass, &quot;\|&quot; MainTable &quot;\|&quot;, &quot;|&quot;)
    Loop 5
        DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hMyEdit%A_Index%%MainTable%)
    DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hClose%MainTable%)
    GuiControl,, MainTable, % &quot;|&quot; PageMass 
    Return
</code></pre></div><p>В конечном итоге правильный вариант наверняка будет зависеть от того что вы будете изменять в ListView и контролах вкладок.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 20 Oct 2015 22:33:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98043#p98043</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98042#p98042</link>
			<description><![CDATA[<p>Написал короткий код (работающий), который должен полностью раскрывать прицеп работы.<br />Задача придать кнопки Close удалять вкладку и все ее элементы.</p><div class="codebox"><pre><code>
;For Gray

PageNum := 0
PageMass := []

Gui, 1:Add, Tab2, x0 y0 h20 w800 vMainTable gMainTable wrap, Главная

Gui, 1:Tab, 1
Gui, 1:Add, ListView, vRequestList gRequestList r5 x40 y40 w300 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2, Название|Поле1|Поле2|Поле3|Поле4
LV_Add(&quot;&quot;, &quot;Audi&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot; )
LV_Add(&quot;&quot;, &quot;BMW&quot;, &quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;B4&quot; )
LV_Add(&quot;&quot;, &quot;KIA&quot;, &quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;, &quot;C4&quot; )
LV_Add(&quot;&quot;, &quot;Opel&quot;, &quot;D1&quot;, &quot;D2&quot;, &quot;D3&quot;, &quot;D4&quot; )
LV_Add(&quot;&quot;, &quot;Mazda&quot;, &quot;E1&quot;, &quot;E2&quot;, &quot;E3&quot;, &quot;E4&quot; )

Gui, 1:Show, w500 h300 xCenter yCenter

Return


RequestList:
    SNumber := LV_GetNext( &quot;Focused&quot; )
    RowNumber := LV_GetNext( 0, &quot;F&quot; )
    if not RowNumber
        Return
    
    if A_GuiEvent = DoubleClick
    {
        LV_GetText( NameTab, RowNumber , 1 )
        
        GoSub MainTable
        
        LV_GetText( ForMyEdit1, RowNumber , 1 )
        LV_GetText( ForMyEdit2, RowNumber , 2 )
        LV_GetText( ForMyEdit3, RowNumber , 3 )
        LV_GetText( ForMyEdit4, RowNumber , 4 )
        
        GuiControl,, MyEdit1%NameTab%, %ForMyEdit1%
        GuiControl,, MyEdit2%NameTab%, %ForMyEdit2%
        GuiControl,, MyEdit3%NameTab%, %ForMyEdit3%
        GuiControl,, MyEdit4%NameTab%, %ForMyEdit4%
    }

    Return
    
    
MainTable:
    Gui SubMit, NoHide
    Loop %PageNum%
    {
        TmpNamePage := PageMass[A_Index]
        if ( TmpNamePage = MainTable || TmpNamePage =  NameTab )
        {
            Return
        }
    }
    PageNum ++
    PageMass[PageNum] := NameTab
    GuiControl,, MainTable, %NameTab%
    Gui, Tab, %NameTab%,, Exact
    ForChooseTab := PageNum + 1
    GuiControl, Choose, MainTable, %ForChooseTab%
    Gui, 1:Add, Text, x20 y30 w60 vMyEdit1%NameTab%
    Gui, 1:Add, Text, x20 y60 w60 vMyEdit2%NameTab%
    Gui, 1:Add, Text, x20 y90 w60 vMyEdit3%NameTab%
    Gui, 1:Add, Text, x20 y120 w60 vMyEdit4%NameTab%
    Gui, 1:Add, Text, x20 y150 w60 vMyEdit5%NameTab%
    Gui, 1:Add, Button, x20 y200 w140 h24 gClose vClose%NameTab%, Закрыть
    Return
    
Close:

    Return

GuiClose:
    ExitApp
    
</code></pre></div><p>Саму вкладку я удалить могу, а вот ее элементы не могу придумать как.<br />Удалить саму вкладку можно вот так.</p><div class="codebox"><pre><code>StringPageTabs := &quot;Главная&quot;</code></pre></div><p>Добавить этот код при создании вкладки<br /></p><div class="codebox"><pre><code>
StringPageTabs .= &quot;|&quot;
StringPageTabs .= NameTab
</code></pre></div><p>А при удалении вот так<br /></p><div class="codebox"><pre><code>
Gui SubMit, NoHide
StringReplace, StringPageTabs, StringPageTabs, |%MainTable%
GuiControl, Choose, MainTable, 1
GuiControl,, MainTable, |
GuiControl,, MainTable, %StringPageTabs%
</code></pre></div><p>После такого удаления эта вклада больше не откроется.<br />Если удалить из массива, то будет при повторном ее открытии ругаться ну дублирующийся переменную.<br />Короче не знаю что делать...</p>]]></description>
			<author><![CDATA[null@example.com (Strongest)]]></author>
			<pubDate>Tue, 20 Oct 2015 20:44:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98042#p98042</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98041#p98041</link>
			<description><![CDATA[<p>Если у вас есть вводные по которым создаётся вкладка, почему по ним же не удалять?</p><p>В любом случае в таком коде никто не будет копатся, приведите небольшой рабочий код, на который получив ответ, вы сможете понять принцип.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 20 Oct 2015 19:42:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98041#p98041</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98040#p98040</link>
			<description><![CDATA[<p>Да тут я выложил 1\30 кода, в таком виде он не скомпелируется... В коде основное для того что бы понят принцип создания вкладке это метка MainTable:<br />Все прогу не реально все равно выложить что бы она работала, у нее там очень тонкие настройки да и базу программы нужно скидывать что бы она работала...<br /> Более подробнее попытаюсь объяснить.<br />Новая вкладка создается вот так<br />NameTab - Это переменная которая содержит имя файла из таблицы ЛистВью<br /></p><div class="codebox"><pre><code>
GuiControl,, MainTable, %NameTab%
                Gui, Tab, %NameTab%,, Exact
</code></pre></div><p>Затем активируем новую вкладку<br /></p><div class="codebox"><pre><code>
GuiControl, Choose, MainTable, %ForChooseRab%
Gui SubMit, NoHide
</code></pre></div><p>Затем на этой вкладке создаются элементы вот таким образом:<br /></p><div class="codebox"><pre><code>
Gui, 1:Add, Text, x425 y10 w60 vDateRequest%MainTable%

    Gui, 1:Add, Text, x30 y20, Номер заявки
    Gui, 1:Add, Edit, x30 y40 w70 h20 Number vNumberRequest%MainTable% ReadOnly
    Gui, 1:Add, Text, x130 y20, Заголовок заявки
    Gui, 1:Add, Edit, x130 y40 w338 h20 vTitleRequest%MainTable%
</code></pre></div><p>Вот так создается новая вкладка с новыми элементами... <br />Задача в состоит в том, что бы когда эта вкладка не нужна, ее со всеми элементами можно было бы удалить подобно </p><div class="codebox"><pre><code>Gui Destroy</code></pre></div><p> Но не все окно а элементы окна.</p>]]></description>
			<author><![CDATA[null@example.com (Strongest)]]></author>
			<pubDate>Tue, 20 Oct 2015 18:42:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98040#p98040</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98039#p98039</link>
			<description><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Error</div><div class="fancy_spoiler"><p>Error:&nbsp; Target label does not exist.</p><p>Specifically: ClearGuiControlSource</p><p>	Line#<br />	031: if ( TmpFlagNum = 1 )&nbsp; <br />	032: {<br />	033: NameTab := MainTable<br />	034: Return<br />	035: }<br />	036: Else<br />	037: {<br />---&gt;	038: Gosub,ClearGuiControlSource<br />	039: GuiControl,,MainTable,%NameTab%<br />	040: Gui,Tab,%NameTab%,,Exact<br />	041: FlagMass[A_Index] := 1&nbsp; <br />	042: GuiControl,Choose,MainTable,%A_Index%<br />	043: StringPageTabs .= &quot;|&quot;&nbsp; <br />	044: StringPageTabs .= NumberRequest&nbsp; <br />	045: Gui,SubMit,NoHide</p><p>The program will exit.</p></div></div>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 20 Oct 2015 18:25:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98039#p98039</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Удаление Gui элементов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98038#p98038</link>
			<description><![CDATA[<p>Есть форма гуи с элементами Tab2, первая вкладка содержит таблицу ListView там есть список фалов по двойному клику создается новая вкладка с именем файла и его содержимым в формах, с созданием новой вкладки также создаются элементы гуи. Наверное все напсианно через &quot;одно место&quot; писал как умею. Задача такая нужно корректно закрывать вкладку и удалять все созданные на ней элементы. Приведу пример кода который создает вкладку. Буду очень благодарен за любую помощь.</p><div class="codebox"><pre><code>
Gui, 1:Add, Tab2, x0 y0 h20 w800 vMainTable gMainTable wrap, Заявки
Gui, 1:Tab, 1
Gui, 1:Add, ListView, vRequestList gRequestList r22 x20 y20 w510 AltSubmit Grid -LV0x10 -Multi NoSortHdr -WantF2 hwndlv, №|Заголовок|Статус|Ответ|Коментарий|


RequestList:
    SNumber := LV_GetNext( &quot;Focused&quot; )
    RowNumber := LV_GetNext( 0, &quot;F&quot; )
    if not RowNumber
        Return
    
    if A_GuiEvent = DoubleClick
    {
        SNumber := LV_GetNext( &quot;Focused&quot; )
        RowNumber := LV_GetNext( 0, &quot;F&quot; )
        FileNumber := &quot;Request\&quot;
        FileNumber .= NumberRequest
        FileNumber .= &quot;.txt&quot;
        GoSub MainTable
    }

MainTable:
    Gui SubMit, NoHide
    NameTab := NumberRequest
    Loop %PageNum%
    {
        TmpNamePage := PageMass[A_Index]
        TmpFlagNum := FlagMass[A_Index]
        if ( TmpNamePage = NameTab )
        {
            if ( TmpFlagNum = 1 )
            {
                NameTab := MainTable
                Return
            }
            else
            {
                GoSub ClearGuiControlSource
                GuiControl,, MainTable, %NameTab%
                Gui, Tab, %NameTab%,, Exact
                FlagMass[A_Index] := 1
                GuiControl, Choose, MainTable, %A_Index%
                StringPageTabs .= &quot;|&quot;
                StringPageTabs .= NumberRequest
                Gui SubMit, NoHide        
                GoSub RefreshGuiControlSource
                Return
            }
        }
    }
    PageNum ++
    PageMass[PageNum] := NumberRequest
    FlagMass[PageNum] := 1
    StringPageTabs .= &quot;|&quot;
    StringPageTabs .= NumberRequest
    PrevNameTabs := NameTab
    
    GuiControl,, MainTable, %NameTab%
    Gui, Tab, %NameTab%,, Exact

    ForChooseRab := PageNum + 1
    GuiControl, Choose, MainTable, %ForChooseRab%
    Gui SubMit, NoHide
    
    Gui, 1:Add, Text, x425 y10 w60 vDateRequest%MainTable%

    Gui, 1:Add, Text, x30 y20, Номер заявки
    Gui, 1:Add, Edit, x30 y40 w70 h20 Number vNumberRequest%MainTable% ReadOnly
    Gui, 1:Add, Text, x130 y20, Заголовок заявки
    Gui, 1:Add, Edit, x130 y40 w338 h20 vTitleRequest%MainTable%

    Gui, 1:Add, GroupBox, x10 y70 w475 h180, Характириситки автомобиля

    Gui, 1:Add, Text, x30 y90, Марка
    Gui, 1:Add, DropDownList, vBrandSource%MainTable% x30 y110, Acura|Alfa Romeo|Audi|BMW|Chevrolet|Chrysler|Citroen|Dacia|Daewoo|DAF|Daihatsu|Dodge|Fiat|Ford|Honda|Hummer|Hyundai|Infiniti|Isuzu|Iveco|Jaguar|Jeep|Kia|Lancia|Land Rover|LDV (DAF)|Lexus|Man|Mazda|Mercedes-Benz|Mini|Mitsubishi|Nissan|Opel|Peugeot|Plymouth|Pontiac|Porsche|Proton|Renault|Rover|Saab|Seat|Skoda|Ssang Yong|Subaru|Suzuki|Toyota|Volkswagen|Volvo

    Gui, 1:Add, Text, x174 y90, Модель
    Gui, 1:Add, Edit, x174 y110 w200 h21 vModelSource%MainTable%

    Gui, 1:Add, Text, x395 y90, Год
    Gui, 1:Add, DropDownList, vYearSource%MainTable% AltSubmit x395 y110 w70, |2015|2014|2013|2012|2011|2010|2009|2008|2007|2006|2005|2004|2003|2002|2001|2000|1999|1998|1997|1996|1995|1994|1993|1992|1991|1990|1989|1988|1987|1986|1985|1984|1983|1982|1981|1980

    Gui, 1:Add, Text, x30 y140, Тип кузова
    Gui, 1:Add, DropDownList, vKuzovSource%MainTable% x30 y160 w90,|Седан|Внедорожник 5д|Внедорожник 3д|Компакт|Универсал|Хэтчбэк 5д|Хетчбэк 3д|Купе|Минивэн|Автобус

    Gui, 1:Add, Text, x148 y140, Тип двигателя
    Gui, 1:Add, DropDownList, vDvsSource%MainTable% x148 y160 w90, |Дизель|Дизель Турбо|Бензин|Бензин Турбо

    Gui, 1:Add, Text, x261 y140, Обьем двигателя
    Gui, 1:Add, DropDownList, vObemSource%MainTable% x261 y160 w90, |0.8|0.9|1.0|1.1|1.2|1.3|1.4|1.5|1.6|1.7|1.8|1.9|2.0|2.1|2.2|2.3|2.4|2.5|2.6|2.7|2.8|2.9|3.0|3.1|3.2|3.3|3.4|3.5|3.6|3.7|3.8|3.9|4.0|4.1|4.2|4.3|4.4|4.5|4.6|4.7|4.8|4.9|5.0|5.1|5.2|5.3|5.4|5.5|5.6|5.7|5.8|5.9|6.0|6.1|6.2|6.3|6.4|6.5|6.6|6.7|6.8|6.9|7.0|7.1|7.2|7.3|7.4|7.5|7.6|7.7|7.8|7.9|8.0

    Gui, 1:Add, Text, x376 y140, Тип КПП
    Gui, 1:Add, DropDownList, vKPPSource%MainTable% x376 y160 w90, |АКПП|Вариатор|МКПП-4ст|МКПП-5ст|МКПП-6ст|Робот|Типтроник

    Gui, 1:Add, Text, x30 y190, Тип привода
    Gui, 1:Add, DropDownList, vPrivodSource%MainTable% x30 y210 w90, |Передний|Задний|Полный


    Gui, 1:Add, Text,  x148 y190, Кондиционер
    Gui, 1:Add, DropDownList, vKonditionSource%MainTable%  x148 y210 w90, |Есть|Нет

    Gui, 1:Add, Text, x261 y190, ABS
    Gui, 1:Add, DropDownList, vAbsSource%MainTable% x261 y210 w90, |ABS|ABS+ASD|Без ABS|ESP

    Gui, 1:Add, Text, x376 y190, VIN
    Gui, 1:Add, Edit, x376 y210 w90 h21 vVinSource%MainTable%

    Gui, 1:Add, GroupBox, x10 y255 w335 h165, Список запчастей
    Gui, 1:Add, Edit, x30 y275 w300 h135 vDetaliSource%MainTable%

    Gui, 1:Add, GroupBox, x350 y255 w137 h165, Контакты клиента
    Gui, 1:Add, Text, x360 y270, Имя
    Gui, 1:Add, Edit, x360 y290 w120 vName%MainTable%

    Gui, 1:Add, Text, x360 y320 vPhoneTextMain%MainTable% w100, Телефон
    Gui, 1:Add, Edit, x360 y340 w120 vPhone%MainTable%

    Gui, 1:Add, Text, x360 y370, E-Mail
    Gui, 1:Add, Edit, x360 y390 w120 vMail%MainTable%

    Gui, 1:Add, GroupBox, x10 y425 w335 h130, Коментарий
    Gui, 1:Add, Edit, x30 y440 w300 h100 vCommentSource%MainTable%

    Gui, 1:Add, Button, x360 y430 w120 h30 gCallPhone vbCall%MainTable%, Позвонить
    Gui, 1:Add, Button, x360 y477 w120 h30 gSendMail vbSendMailForm%MainTable%, Отправить E-Mail
    Gui, 1:Add, Button, x360 y525 w120 h30 gSendSMS vbSendSMS%MainTable%, Отправить SMS

    Gui, 1:Add, Button, x60 y580 w140 h24 gSaveSource vbSaveSource%MainTable%, Сохранить
    Gui, 1:Add, Button, x300 y580 w140 h24 gCloseSource vbCloseSource%MainTable%, Закрыть

    Gui, 1:Add, GroupBox, x500 y10 w300 h600, История общения
    Gui, 1:Add, Edit, x510 y30 w280 h570 ReadOnly vHistoryMessengMain%MainTable%

    GoSub EditRequest

    Return

</code></pre></div><p>Вырваны куски кода которые должны хоть немного обрисовать картину.</p>]]></description>
			<author><![CDATA[null@example.com (Strongest)]]></author>
			<pubDate>Tue, 20 Oct 2015 18:15:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98038#p98038</guid>
		</item>
	</channel>
</rss>
