Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
CommonFileDialog (Filter)
Irgendwie habe ich mit der Syntax noch einige Probleme:
Was ist Flasch daran?
Dim dlgFileDialog As CommonFileDialog
With dlgFileDialog
. DialogTitle = ""
.Filter = ""
.ShowOpen
picMain.Picture = .FileName
End With
Darüber hinaus macht mir die FILTER-Syntax irgendwie Probleme...
Kann mir jemand Nachhilfe geben...
?
Sieh mal
hier
Gruß!
A1880
funktioniert nicht!
Hier mein Code inclusive
"AddFilter"
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Public Sub cmdLoad_Click()
Dim File As String
Dim dlg_Filedialog As New CommonDialog
With dlg_Filedialog
.DialogTitle = "Bild auswählen"
.Filter = ""
AddFilter dlg_Filedialog, "Bilder", "*.jpg"
.ShowOpen True
File = .FileName
End With
If File <> "" Then
MsgBox File
End If
End Sub
Public Sub AddFilter(ByVal dlg As CommonDialog, ByVal filter_title As String, ByVal filter_value As String)
Dim txt As String
txt = dlg.Filter
If Len(txt) > 0 Then txt = txt & "|"
txt = txt & filter_title & " (" & filter_value & ")|" & _
filter_value
dlg.Filter = txt
End Sub
|
Liefert mir folgenden FileDialog:
Yep!
Filter funktionieren noch nicht.
Wie in meinem oben zitierten Artikel beschrieben:
The filter functionality in CommonDialog has not been implemented yet in the current Jabaco framework.
The filter property is CommonDialog ignored for the time being.
Freiwillige Entwickler für's Jabaco-Framework sind derzeit Mangelware.
Gruß!
A1880
Ja, aber wofür dann die ganze METHODE????
Ich persönlich brauche sie nicht!!!!
Weil generell die Filter-Syntax behersche.
Oh Mann blöd...
Dann muss man wohl JABACO noch ein wenig Zeit geben...
Aber die Idee dahinter ist Klasse...
Java-Plattform mit VB-Syntax zu vereinen