Hallo.
Ich wollte grade mal versuchen wie ein Treeview funktioniert.
Hier ist es erstmal:
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.2.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <TreeViewConstants.au3>
#include <StaticConstants.au3>
$GUI1 = GUICreate("Treeview",750,500)
$treeview = GUICtrlCreateTreeView(6, 6, 200, 490, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
$TVI1 = GUICtrlCreateTreeViewItem("Allgemein",$treeview)
$TVI2 = GUICtrlCreateTreeViewItem("Eine Zahl",$TVI1)
$TVI3 = GUICtrlCreateTreeViewItem("Eine andre Zahl", $TVI1)
$2 = GUICtrlCreateLabel("2",300,210)
GUICtrlSetState(-1, $GUI_HIDE)
$4 = GUICtrlCreateLabel("4",300,210)
GUICtrlSetState(-1, $GUI_HIDE)
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]$msg = GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $TVI2
GUICtrlSetState($2, $GUI_SHOW)
Case $msg = $TVI3
GUICtrlSetState($4, $GUI_SHOW)
EndSelect
WEnd
Also, wenn ich auf Eine Zahl klicke dann erscheint die 2, und wenn ich auf Eine andre Zahl klicke dann erscheint die 4. Das ist ja schonmal gut.
Aber wenn ich dann wieder auf Eine Zahl klicke dann bleibt die 4.
Also brauche ich irgendeine Funktion, die die eine Zahl verschwinden lässt und die andere anzeigt!
Ich habe keine Ahnung habe schon mehrere Sachen ausprobiert.
Habt ihr eine Idee???