Closed xsfhacg closed 1 year ago
win64
This is the current documentation for ICefDialogHandler and ICefFileDialogCallback.
Please, update to the latest CEF4Delphi version and use the code from the MiniBrowser demo but remove the TempDialog.Execute call. Just add the file paths and call the ICefFileDialogCallback.cont function with the file paths.
This is the current documentation for ICefDialogHandler and ICefFileDialogCallback.
Please, update to the latest CEF4Delphi version and use the code from the MiniBrowser demo but remove the TempDialog.Execute call. Just add the file paths and call the ICefFileDialogCallback.cont function with the file paths.
【I used to do this in my previous version of CEF93, but after upgrading to CEF102, the callback. count() lacks the parameter selectedAcceptFilter. Running with Win64 bit will no longer return existing images. Here is my code】:
`procedure TFrameBaseWebBrowser.Chromium1FileDialog(Sender: TObject; const browser: ICefBrowser; mode: Cardinal; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean); var I: Integer; ATempFilePath:String; var AFiles:TStringList; begin uBaseLog.HandleException('TFrameFacebookWebSearchAPI.Chromium1FileDialog Begin'); if FContentFiles.Count > 0 then begin AFiles:=TStringList.Create; uBaseLog.HandleException('TFrameFacebookWebSearchAPI.Chromium1FileDialog '
The CEF project removed the selectedAcceptFilter parameter. Remove all instances of selectedAcceptFilter from your code. Remove it from the event parameters too.
Please, use our forum for more questions.
The CEF project removed the selectedAcceptFilter parameter. Remove all instances of selectedAcceptFilter from your code. Remove it from the event parameters too.
Please, use our forum for more questions.
OK,I will use the forum. But when I double-click on the OnFileDialogue event of the Chromium component on the interface, its automatically generated method still has the parameter selectedAcceptFilter. If it is deleted, it will prompt [Property and method Chromium1FileDialogue are not compatible.]
In versions before 100, the Chromium1FileDialog method [callback. Font (selectedAcceptFilter: Integer; const filePaths: TStrings)] can directly add selected images without opening the file selection box. However, in version 102, the selectedAcceptFilter parameter is no longer present. How can we achieve the original function of directly returning selected images without opening the file selection box?