Search the Community
Showing results for tags 'guictrltreeview'.
-
Hello fellow coders. Im currently making a GUI for a webapp. Im using a REST API to get information and display this in a Tree view. Its basically a scheduler of "tasks" and these tasks are great to display in a tree view. The problem im having is that on some servers the tree can get rather large. So my GUI is reziable in ordet to be able to fit all the tasks in the view. I have then used GUICtrlSetResizing with diffrent options to get the GUI to look alright even when i resize it. It works fine an all GUI elements, except for the Tree-view. And if i remember correctly, the treeview item is another type of object and you cannot use regular GUI functions on it. Therefor im wondering of there are any alternatives? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 208, 220, 192, 124,$WS_SIZEBOX) $idTV = _GUICtrlTreeView_Create($Form1, 4, 25, 200, 140) GUICtrlSetResizing(-1,$GUI_DOCKMENUBAR) $Button1 = GUICtrlCreateButton("Button1", 8, 168, 75, 25) GUICtrlSetResizing(-1,$GUI_DOCKSTATEBAR) $Text = GUICtrlCreateLabel("Text", 8, 8, 25, 17) GUICtrlSetResizing(-1,$GUI_DOCKMENUBAR) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd This code is an example of my problem (run it and try to resize the window). If anyone has any ideas i would appreciate it
-
I have troubles with moving script to 64bit - functions "_GUICtrlTreeView_GetImageIndex()" and "_GUICtrlTreeView_GetText()" stop working without any errors treeView control belong some x86 application - and x86 script work with it . What i can do about it? Is it bug in UDF? #AutoIt3Wrapper_UseX64=Y #include <GuiTreeView.au3> Func SubFunction_GetState($hWnd) Local $TVShandle, $TVSSelHandle, $TVSCount, $TVSParentHandle, $TVSS, $i, $TVSItemHandle, $TVSItemIcon AutoItSetOption("WinTitleMatchMode", 2) WinWaitActive($hWnd) $TVShandle = ControlGetHandle($hWnd, "", "[NAME:_treeView]") $TVSSelHandle = _GUICtrlTreeView_GetSelection($TVShandle) ConsoleWrite(@crlf&"$TVSSelHandle = "&$TVSSelHandle&@crlf&"@Error = "&@error&@crlf) $TVSCount = _GUICtrlTreeView_GetSiblingCount($TVShandle, $TVSSelHandle) ConsoleWrite(@crlf&"$TVSCount = "&$TVSCount&@crlf&"@Error = "&@error&@crlf) $TVSParentHandle = _GUICtrlTreeView_GetParentHandle($TVShandle) ConsoleWrite(@crlf&"$TVSParentHandle = "&$TVSParentHandle&@crlf&"@Error = "&@error&@crlf) Local $TVSS[1] = [0] For $i = 0 To $TVSCount-1 $TVSItemHandle = _GUICtrlTreeView_GetItemByIndex($TVShandle, $TVSParentHandle, $i) ConsoleWrite(@crlf&"$TVSItemHandle = "&$TVSItemHandle&@crlf&"@Error = "&@error&@crlf) $TVSItemIcon = _GUICtrlTreeView_GetImageIndex($TVShandle, $TVSItemHandle) ConsoleWrite("$TVSItemIcon = "&$TVSItemIcon&@crlf&"@Error = "&@error&@crlf) ConsoleWrite("_GUICtrlTreeView_GetText = "&_GUICtrlTreeView_GetText($TVShandle, $TVSItemHandle)&@crlf&"@Error = "&@error&@crlf) If $TVSItemIcon = 7 Then ReDim $TVSS[UBound($TVSS)+1] $TVSS[0] += 1 $TVSS[$TVSS[0]] = $TVSItemHandle ConsoleWrite("_GUICtrlTreeView_GetText = !!!"&@crlf) EndIf Next EndFuncx86 script output: $TVSSelHandle = 0x066F3FD0 @Error = 0 $TVSCount = 40 @Error = 0 $TVSParentHandle = 0x003CBFB8 @Error = 0 $TVSItemHandle = 0x066F3930 @Error = 0 $TVSItemIcon = 5 @Error = 0 _GUICtrlTreeView_GetText = Item01 @Error = 0 x64 script output: $TVSSelHandle = 0x00000000066F3FD0 @Error = 0 $TVSCount = 40 @Error = 0 $TVSParentHandle = 0x00000000003CBFB8 @Error = 0 $TVSItemHandle = 0x00000000066F3930 @Error = 0 $TVSItemIcon = 0 @Error = 0 _GUICtrlTreeView_GetText = @Error = 0