TreeView

  • Moin zusammen,

    Hab da mal wieder was.
    Bekomme es einfach nicht hin, dass ein TreeView vor dem Hintergrundbild liegt. Alles funktioniert, nur das TreeView nicht. Muss da noch was anderes beachtet werden?

    Mal ein Beispiel:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $data_dir = @ScriptDir & "\Pflanzen DB\data\"

    [/autoit] [autoit][/autoit] [autoit]

    GUICreate("",1200,600,0,0)
    GUICtrlCreatePic($data_dir & "rod1.jpg", 0, 0, 1200,600)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label_a = GUICtrlCreateLabel("Hier bitte auswählen was du machen möchtest", 26, 174, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $last_save = GUICtrlCreateLabel("Letzte Sicherung war am :", 26, 42, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $saved_entries = GUICtrlCreateLabel("Anzahl gesicherter Einträge :", 26, 90, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $pic_in_db = GUICtrlCreateLabel("Anzahl Bilder in Datenbank :", 26, 114, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $db_save_button = GUICtrlCreateButton("Sichern", 82, 236, 129, 25)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial")
    $db_recover_button = GUICtrlCreateButton("Wiederherstellen", 218, 236, 129, 25)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial")
    $all_entries = GUICtrlCreateLabel("Anzahl Einträge in der Datenbank :", 26, 66, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $all_saved_pics = GUICtrlCreateLabel("Anzahl gesicherter Bilder in Datenbank :", 26, 138, 400, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0x15ADFF)
    $Progress1 = GUICtrlCreateProgress(26, 200, 400, 25)

    [/autoit] [autoit][/autoit] [autoit]

    $TreeView1 = GUICtrlCreateTreeView(538, 6, 533, 605)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    GUICtrlSetState(-1, $GUI_ONTOP)
    $data_Tree = GUICtrlCreateTreeViewItem("Programm-Dateien", $TreeView1)
    $Files_Tree = GUICtrlCreateTreeViewItem("Datensatz-Dateien", $TreeView1)
    $picfiles_Tree = GUICtrlCreateTreeViewItem("Bild-Dateien", $TreeView1)
    $pics_Tree = GUICtrlCreateTreeViewItem("Bilder in der Datenbank", $TreeView1)
    $term_Tree = GUICtrlCreateTreeViewItem("Termin-Dateien", $TreeView1)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()

    [/autoit] [autoit][/autoit] [autoit]

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    MfG
    MrB

  • Sofern das noch nicht gelöst ist:

    Zitat

    This is not enough for Tab or Listview control which behave differently. In this case you need to create the picture with the $WS_CLIPSIBLINGS style, GuiCtrlSetState(-1,$GUI_ONTOP) is necessary for the Tab, TreeView or Listview control.

    Der Hilfe-Eintrag ist da irgendwie nicht ganz korrekt. ^^

    Der Teil mit $WS_CLIPSIBLINGS gilt auch für deinen Treeview, habs mal ausprobiert.

    Mit

    [autoit]

    GUICtrlCreatePic($data_dir & "Sonnenuntergang.jpg", 0, 0, 1200,600, $WS_CLIPSIBLINGS ) ;Pfad musste ich zum Testen auf meinen Beispielbilder-Ordner ändern ;)

    [/autoit]

    funktionierts.

    limette

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.