﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
87	Label disappears when clicking on a button	anonymous		"The first time you click on the button at the bottom, the label, which gives the color to the tab, disappears, then if you click on a tab and on the button again, the label is visible.  Running 3.2.10.0 on Windows 2000. If I click on the button on tab 1, the label disappears most of the times, bug or what ?

{{{
#include <GuiConstantsEx.au3>
#include <GuiTab.au3>
Global $ColorTab, $TabItem, $go, $msg

$main = GUICreate (""Test"", 400,300)
GUISetBkColor (0)
$TabItem = GUICtrlCreateTab(5, 5,390, 260)
GUICtrlCreateTabItem (""Tab item - 1"")
$button1 = GUICtrlCreateButton (""test"", 35, 35, 35,35)
GUICtrlCreateTabItem (""Tab item - 2"")
GUICtrlCreateTabItem (""Tab item - 3"")
GUICtrlCreateTabItem (""Tab item - 4"")
GUICtrlCreateTabItem ("""")
$go = GUICtrlCreateButton (""test"", 5, 270, 390,25)

_GUICtrlTab_SetCurSel(GUICtrlGetHandle($TabItem),0)
_GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),0)
TabEvent()

GUISetState ()
While 1
    $msg = GUIGetMsg ()
    If $msg = $gui_event_close Then ExitLoop
    if $msg = $TabItem Then TabEvent()
    if $msg = $go Then Tab1()
    if $msg = $button1 Then Tab1()
WEnd

Func TabEvent()
	Local $l_tab, $l_tabX, $l_tabY, $l_margin, $l_coord, $l_text
   ; $test = IniRead (""test.ini"", ""Selected"", ""Tab item selected"" , 0)
   	$l_tabX = 5
	$l_tabY = 5
	$l_margin = 1
    $l_tab = _GUICtrlTab_GetCurSel(GUICtrlGetHandle($TabItem))
    $l_coord = _GUICtrlTab_GetItemRect(GUICtrlGetHandle($TabItem), $l_tab); Get coordinates of TabItem
    $l_text = _GUICtrlTab_GetItemText(GUICtrlGetHandle($TabItem), $l_tab); Get text of TabItem
    ;If $test <> $l_tab  Then
    	GUICtrlDelete($ColorTab)
        $ColorTab = GUICtrlCreateLabel($l_text, $l_tabX + $l_coord[0] + $l_margin, $l_tabY + $l_coord[1] + $l_margin, $l_coord[2] - $l_coord[0] - ($l_margin * 2), $l_coord[3] - $l_coord[1] - ($l_margin * 2), BitOR($SS_NOTIFY, $SS_CENTER, $SS_SUNKEN))
        GUICtrlsetBkColor ($ColorTab,0xFFFFC0 ); set the color of the label
     ;   IniWrite (""test.ini"", ""Selected"", ""Tab item selected"", $l_tab)
      ;  $test = $l_tab
    ;EndIf
    _GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),$l_tab)
EndFunc
Func Tab1()
    If $msg = $go Then
        MsgBox (0, """", _GUICtrlTab_GetItemState ($main,0))
    EndIf
EndFunc
}}}
"	Bug	closed		AutoIt	3.2.10.0		No Bug		
