Modify

Opened 16 years ago

Closed 16 years ago

#511 closed Feature Request (Rejected)

GUICtrlCreateTab - doc precision

Reported by: Zedna Owned by:
Milestone: Component: Documentation
Version: Severity: None
Keywords: Cc:

Description

Please add folowing:

When you create control on the Tab by UDF function (_GUICtrlCreate) and not by internal AutoIt's function (GUICtrlCreate) you must show/hide this control yourself.

Also this example can be added as workaround example for this situation (mixed native/UDF controls on Tab)

#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <IPAddressConstants.au3>
#include <TabConstants.au3>
#include <GuiIPAddress.au3>
#include <GuiTab.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 593, 453, 193, 115)
$Tab1 = GUICtrlCreateTab(16, 24, 521, 385)
$hTab = GUICtrlGetHandle($Tab1)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 56, 112, 130, 21)
_GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$MyButton1 = GUICtrlCreateButton("MyButton1", 104, 120, 100, 30, 0)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndTab, $fValid
    $hWndTab = $hTab

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        Case $hWndTab
            Switch $iCode
                Case $TCN_SELCHANGE
                    If _GUICtrlTab_GetCurSel($hTab) = 0 Then ; zero based index of current selected TabItem
                        _GUICtrlIpAddress_ShowHide ($IPAddress1, @SW_SHOW)
                    Else
                        _GUICtrlIpAddress_ShowHide ($IPAddress1, @SW_HIDE)
                    EndIf
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

Here is link to related post:
http://www.autoitscript.com/forum/index.php?showtopic=72894&st=0&p=531772&#entry531772

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by TicketCleanup

  • Version 3.2.12.1 deleted

Automatic ticket cleanup.

comment:2 Changed 16 years ago by Jpm

The AutoIt native function never reference UDF standard function. so it must me documented in the UDF standard part.
Gary has to take care of it if he accepts the improvement for UDF.

comment:3 Changed 16 years ago by Gary

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.