Le sujet est vaste mais la question est simple.

Je souhaite utiliser l'UDF mais je n'arrive pas à insérer du contenu dans les différents onglets.
J'ai tenté différentes fonctions pour définir l'onglet actif avant l'insertion de contrôle mais rien n'y fait :
_GUICtrlTab_ActivateTab()
_GUICtrlTab_SetCurSel()
GUISwitch()
J'ai essayé d'utiliser l'UDF GuiButton et la fonction _GUICtrlButton_Create(), idem.
Pouvez-vous m'indiquer comment faire ?
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <WindowsConstants.au3>
Global $g_hTab
Example()
Func Example()
Local $hGUI
; Create GUI
$hGUI = GUICreate("(UDF Created) Tab Control Create", 400, 300)
$g_hTab = _GUICtrlTab_Create($hGUI, 2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Add tabs
_GUICtrlTab_InsertItem($g_hTab, 0, "Tab 0")
_GUICtrlTab_ActivateTab($g_hTab, 0)
_GUICtrlButton_Create($g_hTab, "Button0", 20, 50, 70, 20)
GUICtrlCreateButton("Button0bis", 150, 50, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 1, "Tab 1")
_GUICtrlTab_SetCurSel($g_hTab, 1)
_GUICtrlButton_Create($g_hTab, "Button1", 20, 100, 70, 20)
GUICtrlCreateButton("Button1bis", 150, 100, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 2, "Tab 2")
GUISwitch($g_hTab, 2)
_GUICtrlButton_Create($g_hTab, "Button2", 20, 150, 70, 20)
GUICtrlCreateButton("Button2bis", 150, 150, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 3, "Tab 3")
_GUICtrlButton_Create($g_hTab, "Button3", 20, 200, 70, 20)
GUICtrlCreateButton("Button3bis", 150, 200, 70, 20)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <WindowsConstants.au3>
Global $g_hTab
Example()
Func Example()
Local $hGUI
; Create GUI
$hGUI = GUICreate("(UDF Created) Tab Control Create", 400, 300)
$g_hTab = _GUICtrlTab_Create($hGUI, 2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Add tabs
_GUICtrlTab_InsertItem($g_hTab, 0, "Tab 0")
_GUICtrlTab_ActivateTab($g_hTab, 0)
_GUICtrlButton_Create($g_hTab, "Button0", 20, 50, 70, 20)
GUICtrlCreateButton("Button0bis", 150, 50, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 1, "Tab 1")
_GUICtrlTab_SetCurSel($g_hTab, 1)
_GUICtrlButton_Create($g_hTab, "Button1", 20, 100, 70, 20)
GUICtrlCreateButton("Button1bis", 150, 100, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 2, "Tab 2")
GUISwitch($g_hTab, 2)
_GUICtrlButton_Create($g_hTab, "Button2", 20, 150, 70, 20)
GUICtrlCreateButton("Button2bis", 150, 150, 70, 20)
_GUICtrlTab_InsertItem($g_hTab, 3, "Tab 3")
_GUICtrlButton_Create($g_hTab, "Button3", 20, 200, 70, 20)
GUICtrlCreateButton("Button3bis", 150, 200, 70, 20)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example