Sign in to follow this  
Followers 0
JeromeB

Problem with _GuiCtrlIPAdress

7 posts in this topic

#1 ·  Posted (edited)

Hey everyone,

I got a problem with this code :

; Include :
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <GUIListBox.au3>
#Include <GuiListView.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <Inet.au3>
#include <WindowsConstants.au3>
#include <Excel.au3>
#include <GuiTab.au3>


Global $i


; Form 1

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("By Jérôme", 616, 430, 192, 124)
Opt("GUIOnEventMode", 1) ; Event mode
GUISetIcon(@ScriptDir & "\icon.ico")
TraySetIcon(@ScriptDir & "\icon.ico")
$Tab1 = GUICtrlCreateTab(0, 0, 633, 25)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)


$TabSheet1 = GUICtrlCreateTabItem("List")
GUISetFont(8, 400, 0, "Tahoma")
$IPAddress11 = _GUICtrlIpAddress_Create($Form1, 96, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress11, "192.168.220.102")
$IPAddress22 = _GUICtrlIpAddress_Create($Form1, 272, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress22, "192.168.220.105")
$Label1 = GUICtrlCreateLabel("De :", 48, 400, 28, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Label2 = GUICtrlCreateLabel("a :", 248, 400, 20, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Button1 = GUICtrlCreateButton("Start", 432, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button1, "ActionButton1")
$Button2 = GUICtrlCreateButton("Export", 520, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button2, "Excel")
GUIctrlSetState($Button2, $GUI_DISABLE)
$List1 = GUICtrlCreateListView("", 16, 32, 580, 357)
_GUICtrlListView_AddColumn($List1, "IP", 100)
_GUICtrlListView_AddColumn($List1, "Computer Name", 100)
_GUICtrlListView_AddColumn($List1, "User Actually Connected", 200)



$TabSheet2 = GUICtrlCreateTabItem("More")
$Group1 = GUICtrlCreateGroup("IP > Poste", 8, 32, 600, 65)
$Button3 = GUICtrlCreateButton("Go", 200, 64, 59, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("", 292, 64, 220, 28)
$IPAddress3 = _GUICtrlIpAddress_Create($Form1, 48, 64, 130, 21)
_GUICtrlIpAddress_Set($IPAddress3, "")
$Group2 = GUICtrlCreateGroup("Poste > IP", 8, 112, 600, 65)
$Input1 = GUICtrlCreateInput("", 48, 144, 121, 21)
$Button4 = GUICtrlCreateButton("Go", 200, 144, 59, 25, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("", 288, 144, 220, 28)
;_GUICtrlIpAddress_Destroy($IPAddress11)

GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "exit")
#EndRegion ### END Koda GUI section ###

While 1
    sleep(1000)
WEnd


Func ActionButton1()
    $IPAddress1 = StringSplit(_GUICtrlIpAddress_Get($IPAddress11), ".")
    $IPAddress2 = StringSplit(_GUICtrlIpAddress_Get($IPAddress22), ".")
    GUIctrlSetState($Button1, $GUI_DISABLE)
    GUIctrlSetState($Button2, $GUI_DISABLE)
    Global $avArray[255][3], $j
    $j = 0
    _GUICtrlListView_DeleteAllItems($List1)
    TCPStartup()
    If @error Then Return GUICtrlCreateListViewItem('Aucun résultats',$List1)
    For $i = $IPAddress1[4] To $IPAddress2[4]
        ;GUICtrlSetData($Label4, "Ckecking : 192.168.220." & $i)
        If Ping($IPAddress1[1] & "." & $IPAddress1[2] & "." &$IPAddress1[3] & "." & $i, 50) > 0 Then
            $IpList = $IPAddress1[1] & "." & $IPAddress1[2] & "." &$IPAddress1[3] & "." & $i
            $sResult = _TCPIpToName($IpList, 0)
            $j = $j + 1
            If $sResult = "" Then
                $sResult = "No Name"
            EndIf
            $string = "local"
            If StringRight($sResult, 5) = $string Then
                $sResult = stringTrimRight($sResult, 5)
            EndIf
            If $sResult = "No Name" Then
                $user = "Nobody"
            Else
                $objWMIService = ObjGet("winmgmts:" _
                & "{impersonationLevel=impersonate}!\\" _
                & $IpList & "\root\cimv2")
                If @error Then
                    $user = "Nobody"
                Else
                    $colComputers = $objWMIService.ExecQuery _
                    ("Select * from Win32_ComputerSystem")
                    For $objComputer in $colComputers
                        $user = $objComputer.UserName
                    Next
                EndIf
            EndIf
            GUICtrlCreateListViewItem($IpList & "|" & $sResult & "|" & $user, $List1)
            $avArray[$j][0] = $IpList
            $avArray[$j][1] = $sResult
            $avArray[$j][2] = $user
        EndIf
    Next
GUIctrlSetState($Button1, $GUI_ENABLE)
GUIctrlSetState($Button2, $GUI_ENABLE)
EndFunc ;==>ActionButton1

Func Excel()
    $oExcel = _ExcelBookNew()
    $iItems = _GUICtrlListView_GetItemCount($List1)
    For $iItem = 0 To $iItems-1
        $Zf = _GUICtrlListView_GetItemTextString($List1, $iItem)
        $Zf = StringSplit($Zf, "|", 1)
        _ExcelWriteArray($oExcel, $iItem + 1, 1, $Zf, 0, 1)
    Next
EndFunc ;==>Excel


Func exit()
    Exit
EndFunc

When i change tab, it keep the IPcontrol, how can i change this?

Thx.

Edited by Jerome60

Share this post


Link to post
Share on other sites



Jerome60 ,

_GUICtrlIpAddress_Create returns a handle, not a ControlID, so you need to look after the hiding/showing of the control yourself in the code as the tab selection varies. ;)

The Tabs tutorial in the Wiki explains in more detail and has many examples of how to deal with the situation. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Hey,

thx for your answer, i did this :

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.6.1
 Author:         Jérome

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
; Include :
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <GUIListBox.au3>
#Include <GuiListView.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <Inet.au3>
#include <WindowsConstants.au3>
#include <Excel.au3>
#include <GuiTab.au3>


Global $i


; Form 1

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("By Jérôme", 616, 430, 192, 124)
Opt("GUIOnEventMode", 1) ; Event mode
GUISetIcon(@ScriptDir & "\icon.ico")
TraySetIcon(@ScriptDir & "\icon.ico")
$Tab1 = _GUICtrlTab_Create($Form1, 0, 0, 633, 25)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)


_GUICtrlTab_InsertItem($Tab1, 0, "List IP")
;$TabSheet1 = GUICtrlCreateTabItem("List IP")
GUISetFont(8, 400, 0, "Tahoma")
$IPAddress11 = _GUICtrlIpAddress_Create($Form1, 96, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress11, "192.168.220.102")
$IPAddress22 = _GUICtrlIpAddress_Create($Form1, 272, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress22, "192.168.220.105")
$Label1 = GUICtrlCreateLabel("De :", 48, 400, 28, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Label2 = GUICtrlCreateLabel("a :", 248, 400, 20, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Button1 = GUICtrlCreateButton("Start", 432, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button1, "ActionButton1")
$Button2 = GUICtrlCreateButton("Export", 520, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button2, "Excel")
GUIctrlSetState($Button2, $GUI_DISABLE)
$List1 = GUICtrlCreateListView("", 16, 32, 580, 357)
_GUICtrlListView_AddColumn($List1, "IP", 100)
_GUICtrlListView_AddColumn($List1, "Computer Name", 100)
_GUICtrlListView_AddColumn($List1, "User Actually Connected", 200)



_GUICtrlTab_InsertItem($Tab1, 1, "Utilitaires")
;$TabSheet2 = GUICtrlCreateTabItem("Utilitaires")
$Group1 = GUICtrlCreateGroup("IP > Poste", 8, 32, 600, 65)
$Button3 = GUICtrlCreateButton("Go", 200, 64, 59, 25, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("", 292, 64, 220, 28)
$IPAddress3 = _GUICtrlIpAddress_Create($Form1, 48, 64, 130, 21)
_GUICtrlIpAddress_Set($IPAddress3, "")
$Group2 = GUICtrlCreateGroup("Poste > IP", 8, 112, 600, 65)
$Input1 = GUICtrlCreateInput("", 48, 144, 121, 21)
$Button4 = GUICtrlCreateButton("Go", 200, 144, 59, 25, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("", 288, 144, 220, 28)
;_GUICtrlIpAddress_Destroy($IPAddress11)

WinSetState($IPAddress3, "", @SW_HIDE)
tab2($GUI_HIDE)
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "quitter")
#EndRegion ### END Koda GUI section ###

$iLastTab = 0

While 1
    sleep(100)
    $iCurrTab = _GUICtrlTab_GetCurFocus($Tab1)
    switch1()
WEnd



Func switch1()
    If $iCurrTab <> $iLastTab Then
        $iLastTab = $iCurrTab
        Switch $iCurrTab
            Case 0
                tab1($GUI_SHOW)
                tab2($GUI_HIDE)
                WinSetState($IPAddress3, "", @SW_HIDE)
                WinSetState($IPAddress11, "", @SW_SHOW)
                WinSetState($IPAddress22, "", @SW_SHOW)
            Case 1
                tab1($GUI_HIDE)
                tab2($GUI_SHOW)
                WinSetState($IPAddress11, "", @SW_HIDE)
                WinSetState($IPAddress22, "", @SW_HIDE)
                WinSetState($IPAddress3, "", @SW_SHOW)
        EndSwitch
    EndIf
EndFunc

Func Tab1($Var)
    GUICtrlSetState($Label1, $Var)
    GUICtrlSetState($Label2, $Var)
    GUICtrlSetState($Button1, $Var)
    GUICtrlSetState($Button2, $Var)
    GUICtrlSetState($List1, $Var)
EndFunc ;==>Tab1

Func Tab2($Var)
    GUICtrlSetState($Button3, $Var)
    GUICtrlSetState($Group1, $Var)
    GUICtrlSetState($Label3, $Var)
    GUICtrlSetState($Group2, $Var)
    GUICtrlSetState($Input1, $Var)
    GUICtrlSetState($Button4, $Var)
    GUICtrlSetState($Label4, $Var)
EndFunc ;==>Tab2



Func ActionButton1()
    $IPAddress1 = StringSplit(_GUICtrlIpAddress_Get($IPAddress11), ".")
    $IPAddress2 = StringSplit(_GUICtrlIpAddress_Get($IPAddress22), ".")
    GUIctrlSetState($Button1, $GUI_DISABLE)
    GUIctrlSetState($Button2, $GUI_DISABLE)
    Global $avArray[255][3], $j
    $j = 0
    _GUICtrlListView_DeleteAllItems($List1)
    TCPStartup()
    If @error Then Return GUICtrlCreateListViewItem('Aucun résultats',$List1)
    For $i = $IPAddress1[4] To $IPAddress2[4]
        ;GUICtrlSetData($Label4, "Ckecking : 192.168.220." & $i)
        If Ping($IPAddress1[1] & "." & $IPAddress1[2] & "." &$IPAddress1[3] & "." & $i, 50) > 0 Then
            $IpList = $IPAddress1[1] & "." & $IPAddress1[2] & "." &$IPAddress1[3] & "." & $i
            $sResult = _TCPIpToName($IpList, 0)
            $j = $j + 1
            If $sResult = "" Then
                $sResult = "No Name"
            EndIf
            $string = "local"
            If StringRight($sResult, 5) = $string Then
                $sResult = stringTrimRight($sResult, 5)
            EndIf
            If $sResult = "No Name" Then
                $user = "Nobody"
            Else
                $objWMIService = ObjGet("winmgmts:" _
                & "{impersonationLevel=impersonate}!\\" _
                & $IpList & "\root\cimv2")
                If @error Then
                    $user = "Nobody"
                Else
                    $colComputers = $objWMIService.ExecQuery _
                    ("Select * from Win32_ComputerSystem")
                    For $objComputer in $colComputers
                        $user = $objComputer.UserName
                    Next
                EndIf
            EndIf
            GUICtrlCreateListViewItem($IpList & "|" & $sResult & "|" & $user, $List1)
            $avArray[$j][0] = $IpList
            $avArray[$j][1] = $sResult
            $avArray[$j][2] = $user
        EndIf
    Next
GUIctrlSetState($Button1, $GUI_ENABLE)
GUIctrlSetState($Button2, $GUI_ENABLE)
EndFunc ;==>ActionButton1

Func Excel()
    $oExcel = _ExcelBookNew()
    $iItems = _GUICtrlListView_GetItemCount($List1)
    For $iItem = 0 To $iItems-1
        $Zf = _GUICtrlListView_GetItemTextString($List1, $iItem)
        $Zf = StringSplit($Zf, "|", 1)
        _ExcelWriteArray($oExcel, $iItem + 1, 1, $Zf, 0, 1)
    Next
EndFunc ;==>Excel




Func quitter()
    Exit
EndFunc   ;==>quitter

Is there is some other way easier and better to do it, cause its lagging a little to hide and show the IPadressecontrol.

Thx ;)

Share this post


Link to post
Share on other sites

Jerome60,

Why are you using the GUITab UDF to create the tab control? ;)

If you use the native Tab commands, AutoIt will look after the native controls and you only have to worry about the _GUICtrlIpAddress_Create controls (look for the <<<<<<<<<< lines): :)

; Include :
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <GUIListBox.au3>
#include <GuiListView.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <Inet.au3>
#include <WindowsConstants.au3>
#include <Excel.au3>
#include <GuiTab.au3>

Global $i

; Form 1

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("By Jérôme", 616, 430, 192, 124)
Opt("GUIOnEventMode", 1) ; Event mode
GUISetIcon(@ScriptDir & "\icon.ico")
TraySetIcon(@ScriptDir & "\icon.ico")

$Tab1 = GUICtrlCreateTab(0, 0, 633, 25) ; <<<<<<<<<<<<<<<<<<<<<<<<<
GUICtrlSetOnEvent(-1, "_Tab_Switch") ; <<<<<<<<<<<<<<<<<<<<<<<<<
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)

$TabSheet1 = GUICtrlCreateTabItem("List IP") ; <<<<<<<<<<<<<<<<<<<<<<<<<
GUISetFont(8, 400, 0, "Tahoma")
$IPAddress11 = _GUICtrlIpAddress_Create($Form1, 96, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress11, "192.168.220.102")
$IPAddress22 = _GUICtrlIpAddress_Create($Form1, 272, 400, 130, 21)
_GUICtrlIpAddress_Set($IPAddress22, "192.168.220.105")
$Label1 = GUICtrlCreateLabel("De :", 48, 400, 28, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Label2 = GUICtrlCreateLabel("a :", 248, 400, 20, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$Button1 = GUICtrlCreateButton("Start", 432, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button1, "ActionButton1")
$Button2 = GUICtrlCreateButton("Export", 520, 398, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button2, "Excel")
GUICtrlSetState($Button2, $GUI_DISABLE)
$List1 = GUICtrlCreateListView("", 16, 32, 580, 357)
_GUICtrlListView_AddColumn($List1, "IP", 100)
_GUICtrlListView_AddColumn($List1, "Computer Name", 100)
_GUICtrlListView_AddColumn($List1, "User Actually Connected", 200)

$TabSheet2 = GUICtrlCreateTabItem("Utilitaires") ; <<<<<<<<<<<<<<<<<<<<<<<<<
$Group1 = GUICtrlCreateGroup("IP > Poste", 8, 32, 600, 65)
$Button3 = GUICtrlCreateButton("Go", 200, 64, 59, 25, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("", 292, 64, 220, 28)
$IPAddress3 = _GUICtrlIpAddress_Create($Form1, 48, 64, 130, 21)
_GUICtrlIpAddress_Set($IPAddress3, "")
$Group2 = GUICtrlCreateGroup("Poste > IP", 8, 112, 600, 65)
$Input1 = GUICtrlCreateInput("", 48, 144, 121, 21)
$Button4 = GUICtrlCreateButton("Go", 200, 144, 59, 25, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("", 288, 144, 220, 28)

WinSetState($IPAddress3, "", @SW_HIDE)
GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "quitter")
#EndRegion ### END Koda GUI section ###

Global $iLastTab = 0

While 1
    Sleep(100)
WEnd

Func _Tab_Switch() ; <<<<<<<<<<<<<<<<<<<<<<<<<
    ; Check which Tab is active
    Local $iCurrTab = GUICtrlRead($Tab1)
    ; If the Tab has changed
    If $iCurrTab <> $iLastTab Then
        ; Show/Hide controls as required
        Switch $iCurrTab
            Case 0
                WinSetState($IPAddress11, "", @SW_SHOW)
                WinSetState($IPAddress22, "", @SW_SHOW)
            Case 1
                WinSetState($IPAddress11, "", @SW_HIDE)
                WinSetState($IPAddress22, "", @SW_HIDE)
        EndSwitch
        ; Store the value for future comparisons
        $iLastTab = $iCurrTab
    EndIf
EndFunc   ;==>_Tab_Switch

Func ActionButton1()
    $IPAddress1 = StringSplit(_GUICtrlIpAddress_Get($IPAddress11), ".")
    $IPAddress2 = StringSplit(_GUICtrlIpAddress_Get($IPAddress22), ".")
    GUICtrlSetState($Button1, $GUI_DISABLE)
    GUICtrlSetState($Button2, $GUI_DISABLE)
    Global $avArray[255][3], $j
    $j = 0
    _GUICtrlListView_DeleteAllItems($List1)
    TCPStartup()
    If @error Then Return GUICtrlCreateListViewItem('Aucun résultats', $List1)
    For $i = $IPAddress1[4] To $IPAddress2[4]
        ;GUICtrlSetData($Label4, "Ckecking : 192.168.220." & $i)
        If Ping($IPAddress1[1] & "." & $IPAddress1[2] & "." & $IPAddress1[3] & "." & $i, 50) > 0 Then
            $IpList = $IPAddress1[1] & "." & $IPAddress1[2] & "." & $IPAddress1[3] & "." & $i
            $sResult = _TCPIpToName($IpList, 0)
            $j = $j + 1
            If $sResult = "" Then
                $sResult = "No Name"
            EndIf
            $string = "local"
            If StringRight($sResult, 5) = $string Then
                $sResult = StringTrimRight($sResult, 5)
            EndIf
            If $sResult = "No Name" Then
                $user = "Nobody"
            Else
                $objWMIService = ObjGet("winmgmts:" _
                         & "{impersonationLevel=impersonate}!\\" _
                         & $IpList & "\root\cimv2")
                If @error Then
                    $user = "Nobody"
                Else
                    $colComputers = $objWMIService.ExecQuery _
                            ("Select * from Win32_ComputerSystem")
                    For $objComputer In $colComputers
                        $user = $objComputer.UserName
                    Next
                EndIf
            EndIf
            GUICtrlCreateListViewItem($IpList & "|" & $sResult & "|" & $user, $List1)
            $avArray[$j][0] = $IpList
            $avArray[$j][1] = $sResult
            $avArray[$j][2] = $user
        EndIf
    Next
    GUICtrlSetState($Button1, $GUI_ENABLE)
    GUICtrlSetState($Button2, $GUI_ENABLE)
EndFunc   ;==>ActionButton1

Func Excel()
    $oExcel = _ExcelBookNew()
    $iItems = _GUICtrlListView_GetItemCount($List1)
    For $iItem = 0 To $iItems - 1
        $Zf = _GUICtrlListView_GetItemTextString($List1, $iItem)
        $Zf = StringSplit($Zf, "|", 1)
        _ExcelWriteArray($oExcel, $iItem + 1, 1, $Zf, 0, 1)
    Next
EndFunc   ;==>Excel

Func quitter()
    Exit
EndFunc   ;==>quitter

But I know of no way to prevent the lag - as I wrote in the tutorial: ;)

Note the lag in hiding/showing the UDF created controls. [...] A lot of work and a not very satisfactory result

If you ever find a better way, please let me know! :shocked:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

thx a lot ;)

Share this post


Link to post
Share on other sites

I found this thread while hunting some good tips.

It seems the IP Address show/hide works much better using ControlShow/ControlHide, as follows:

Switch $iCurrTab
            Case 0
    ControlShow("","",$IPAddress11)
    ControlShow("","",$IPAddress22)
;    WinSetState($IPAddress11, "", @SW_SHOW)
;    WinSetState($IPAddress22, "", @SW_SHOW)
            Case 1
    ControlHide("","",$IPAddress11)
    ControlHide("","",$IPAddress22)
;    WinSetState($IPAddress11, "", @SW_HIDE)
;    WinSetState($IPAddress22, "", @SW_HIDE)
        EndSwitch

At least trying Jerome's code on my PC I have no lag at all to redraw IP Address fields, which lag alot with WinSetState.

Hope it helps.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

kwas,

Welcome to the AutoIt forum. :)

Thanks for pointing it out, but we discovered that fix a while ago. Take a look at the current Tabs tutorial in the Wiki to see how it compares. :D

M23

Edit: Clarity (I hope!). ;)

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0