Re: Problem with "Links"-Dropdown

  •  06-15-2005, 3:05 AM

    Re: Problem with "Links"-Dropdown

    Hi,
     
    this is my code:

            'Show content of folder
            Private Function leseVerzeichnisinhalt(ByRef adropdown As CuteEditor.RichDropDownList, ByVal aOrdner As String)
                Dim result As Boolean = True
                Dim verzeichnispfad As String
                Dim dateipfad As String
                verzeichnispfad = getWebpfad() & Dokupfad & aOrdner
                Dim d As DirectoryInfo = New DirectoryInfo(verzeichnispfad)
                If d.Exists Then
                    Dim d_unterliste As DirectoryInfo() = d.GetDirectories()
                    Dim d_unter As DirectoryInfo
                    For Each d_unter In d_unterliste
                        leseVerzeichnisinhalt(adropdown, aOrdner & "/" & d_unter.Name)
                    Next
                    Dim f As FileInfo() = d.GetFiles()
                    Dim datei As FileInfo
                    For Each datei In f
                        dateipfad = aOrdner & "/" & Server.UrlEncode(datei.Name)
                        adropdown.Items.Add(dateipfad, "[WZKPHTMLDOCLINK:]" & dateipfad)
                    Next
                End If
                result = False
            End Function
     
    MAIN SUB:::
            dropdown = DirectCast(Editor.ToolControls("Links").Control, CuteEditor.RichDropDownList)
            richitem = dropdown.Items(0)
            dropdown.Items.Clear()
            dropdown.Items.Add(richitem)
            leseVerzeichnisinhalt(dropdown, "")
     
    Thanks
    Juergen
View Complete Thread