Jump to content

Search the Community

Showing results for tags 'tab control'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 3 results

  1. Hi all and thanks for stopping by to read this, much appreciated. What I have is a gui with a tab control that has 8 tabs, Some of those can have multiple pages that I would like to display in a "Sub" tab control which will display information from various sources (web Pages) . I have been looking around on the web, but have not stumbled on the source for information yet... Any help would be great, thanks Mike
  2. I have a script that uses the Tab control with 3 tabs on it and I want to ignore clicks on the other tabs if I have certain items selected on the current tab. I'm pretty sure I can do it in WM_NOTIFY handler, but I've tried and failed to detect the Tab switch notification. here is my test script: #include <Debug.au3> _DebugSetup(@ScriptName & "_debug.txt", False, 5, "") ; 6 = Notepad; 2 = to console; 4 = to a file _DebugOut("=============== " & @MON & "/" & @MDAY & "/" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC & " ====================" & @CRLF) #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_UseX64=N #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTab.au3> #include <GuiListView.au3> Opt("GUICloseOnESC", 1) ; ESC closes GUI? (0 = no, 1 = yes) Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt('MustDeclareVars', 1) OnAutoItExitRegister("Event_GUIClose") Opt("GUIEventOptions", 1) ;0=default, 1=just notification, 2=GuiCtrlRead tab index Opt("WinTitleMatchMode", -2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Global $hMainWin = 0 Global $hTab = 0 Global $aIDs = StringSplit("", "") Global $ahWnds = StringSplit("", "") Global $aTypes = StringSplit("", "") Global $iCounter = 0 _Main() Exit (0) Func _Main() $hMainWin = 0 CreateAllControls() fillListViews() GUISetOnEvent($GUI_EVENT_CLOSE, 'Event_GUIClose') GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState(@SW_SHOW) ; Make everything visible While 1 Sleep(250) WEnd Exit (0) EndFunc ;==>_Main Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) ;_DebugOut("+++:[" & $iCounter & "]: WM_NOTIFY(" & Hex($hWnd) & "|" & Hex($iMsg) & "|" & Hex($iwParam) & "|" & Hex($ilParam) & ") entered") Local $iCode, $tNMHDR, $param, $ret, $hWndFrom #forceref $hWnd, $iMsg, $iwParam, $param, $ret, $hWndFrom, $iCode $iCounter += 1 $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") ;_DebugOut("+++: $iCode = " & $iCode) ; -12 = $NM_CUSTOMDRAW Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func CreateAllControls() Local $mw, $mh, $iID_Menu ; Create the Main window first $mw = 600 $mh = 400 $hMainWin = GUICreate("Test 7", $mw, $mh, 383, 54) ; Create the File menu and it's choices $iID_Menu = GUICtrlCreateMenu("&File") GUICtrlCreateMenuItem("", $iID_Menu) GUICtrlCreateMenuItem("a-Exit", $iID_Menu) ; ; Create all controls that will be common to all tabs ; GUICtrlCreateButton("Btn1", 10, 5, 50, 25) GUICtrlCreateButton("Btn2", 70, 5, 45, 25) GUICtrlCreateButton("Btn3", $mw - 55, 5, 40, 25) GUICtrlSetOnEvent(-1, "handle_Btn3") GUICtrlCreateButton("Exit", 10, $mh - 50, 45, 25) GUICtrlSetOnEvent(-1, "Event_GUIClose") GUICtrlCreateButton("Save", ($mw / 2), $mh - 50, 45, 25) GUICtrlCreateButton("Quit", $mw - 55, $mh - 50, 45, 25) create_tabs($mw, $mh) ; Create the tabbed interface ; Create a listview beside the Tabs createListView("X", 250, 60, 200, 200) EndFunc ;==>CreateAllControls Func create_tabs($mw, $mh) $hTab = GUICtrlCreateTab(20, 35, $mw - 50, $mh - 90) createTabItem("Games") createTabItem("Payments") createTabItem("Items") _GUICtrlTab_ActivateTab($hTab, 0) EndFunc ;==>create_tabs Func createTabItem($sTitle) Local $tabnum, $chu, $chl $tabnum = _GUICtrlTab_GetItemCount($hTab) _DebugOut("+++: $tabnum = " & $tabnum) $chu = StringLeft($sTitle, 1) $chl = StringLower($chu) GUICtrlCreateTabItem($sTitle & "-" & $chl) _GUICtrlTab_ActivateTab($hTab, $tabnum) createListView("T", 25, 60, 200, 200) GUICtrlCreateButton("TEST-" & $chu, 25, 260, 70, 20) GUICtrlCreateTabItem("") EndFunc ;==>createTabItem Func createListView($type, $x, $y, $w, $h, $lnum = @ScriptLineNumber) #forceref $lnum _DebugOut("+++:" & $lnum & ": createListView(" & $type & ", " & $x & "," & $y & "," & $w & "," & $h & ") entered") Local $str, $flags, $id $str = "col1" & @TAB & "|col2" & @TAB & "|col3" & @TAB $flags = 0 $flags = BitOR($flags, $WS_BORDER) $flags = BitOR($flags, $WS_VSCROLL) $flags = BitOR($flags, $WS_HSCROLL) $flags = BitOR($flags, $WS_TABSTOP) ;$flags = BitOR($flags, $LBS_NOTIFY) $flags = BitOR($flags, $LVS_SHOWSELALWAYS) $id = GUICtrlCreateListView($str, $x, $y, $w, $h) _ArrayAdd($aIDs, $id) _ArrayAdd($ahWnds, GUICtrlGetHandle($id)) _ArrayAdd($aTypes, $type) EndFunc ;==>createListView Func Event_GUIClose() Exit (1) EndFunc ;==>Event_GUIClose Func handle_Btn3() Local $tabnum = _GUICtrlTab_GetCurSel($hTab) + 1 If ($tabnum > 2) Then $tabnum = 0 _GUICtrlTab_ActivateTab($hTab, $tabnum) EndFunc ;==>handle_Btn3 Func fillListViews() Local $ndx, $id, $hWnd, $cnt, $subndx, $iIndex, $str, $chu For $ndx = 1 To UBound($aIDs) - 1 $id = $aIDs[$ndx] $hWnd = GUICtrlGetHandle($id) If ($aTypes[$ndx] == "T") Then $chu = StringLeft(_GUICtrlTab_GetItemText($hTab, $ndx - 1), 1) Else $chu = "X" EndIf For $cnt = 1 To 5 $iIndex = _GUICtrlListView_AddItem($hWnd, "Item" & $ndx) For $subndx = 1 To 3 $str = "Sub" & $cnt & $chu & $subndx _GUICtrlListView_AddSubItem($hWnd, $iIndex, $str, $subndx - 1) Next Next Next EndFunc ;==>fillListViews
  3. Hi, I have simple problem. I try create GUI with tabs and when I use in one tab IpAddressInputBox then this control is visible for all tabs when I switch view. I attached example of my problem. Could you advice me how to fix this issue? Ofc i can use standard input box but I want to stay with IpadressInputBox in tab. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\root\desktop\tabs.kxf $Form1_1 = GUICreate("Form1", 623, 204, 192, 114) $Tab1 = GUICtrlCreateTab(80, 40, 457, 137) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") GUICtrlSetState(-1,$GUI_SHOW) $IPAddress1 = _GUICtrlIpAddress_Create($Form1_1, 400, 88, 105, 17) _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0") $Button1 = GUICtrlCreateButton("Button1", 256, 80, 113, 17) $Label1 = GUICtrlCreateLabel("Label1", 256, 104, 116, 17) $Edit1 = GUICtrlCreateEdit("", 96, 80, 145, 81) GUICtrlSetData(-1, "Edit1") $Input1 = GUICtrlCreateInput("Input1", 256, 128, 105, 21) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
×
×
  • Create New...