Domino 9 und frühere Versionen > ND6: Entwicklung

Link einfügen

<< < (2/2)

LuCypher:
Es tut....


...aber doch nicht so ganz!

Vielleicht fehlt mir einfach die Erfahrung oder ich stell mich heute einfach nur blöd an:

Ich hab das ganze jetzt in eine Aktion gepackt. Er holt sich auch den Pfad  richtig.... nur wie bekomm ich den Pfad aus der variable filepath$ die ich über die Call-Anweisung bekomm in ein Textfeld?

Semeaphoros:
FieldSetText Methode

LuCypher:
Ok.... meine Lösung:

Declarations:

--- Code: ---Const BIF_DONTGOBELOWDOMAIN = 2
Const BIF_RETURNONLYFSDIRS = 1
Const BIF_BROWSEINCLUDEFILES  = &H4000
Const MAX_PATH = 260
Private Type BrowseInfo
hWndOwner      As Long
pIDLRoot       As Long
pszDisplayName As Long
lpszTitle      As String
ulflags        As Long
lpfnCallback   As Long
lParam         As Long
iImage         As Long
End Type
Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Declare Function SHGetPathFromIDList Lib "shell32" (Byval pidList As Long, Byval lpBuffer As String) As Long
--- Ende Code ---

Get Folder Klasse


--- Code: ---Sub get_folder(filepath As String)
Dim lpIDList As Long
Dim sBuffer As String *260
Dim szTitle As String
Dim temp As String
Dim endpath As String

Dim tBrowseInfo As BrowseInfo

tbrowseinfo.lpszTitle = "Bitte den Zielordner wählen"
tBrowseInfo.ulflags = BIF_BROWSEINCLUDEFILES

lpIDList = SHBrowseForFolder(tBrowseInfo)

If (lpIDList) Then
SHGetPathFromIDList lpIDList, sBuffer
temp = Left(sBuffer, Instr(sBuffer, Chr(0)) - 1)
endpath = "\"
filepath$ = temp
If Not Right$(filepath$,1) = endpath Then
filepath$ = temp + endpath
End If
Else
End
End If
End Sub
--- Ende Code ---

Und das auslösende Click-Event


--- Code: ---Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim item As NotesItem
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document

filepath$ = ""
Call get_folder(filepath$)
Set item = doc.GetFirstItem("txtSAV")
item.AppendToTextList(filepath$)
uidoc.FieldSetText "txtSAV",item.Text

Call uidoc.Refresh
End Sub
--- Ende Code ---

Das ganze wird dann in ein Textfeld geschrieben und dort als Mehrfachwert behandelt.

Ist es möglich, direkt bei der Eingabe des Pfades diesen in einen Link umzuwandeln der auf die entsprechende Adresse verweist?

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln