You've already forked lazarus-ccr
Open dialog's filter was not working in both sample apps.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1415 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -245,6 +245,7 @@ procedure TForm1.OpenFileClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
if Viewer.CurrentFile <> '' then
|
if Viewer.CurrentFile <> '' then
|
||||||
OpenDialog.InitialDir := ExtractFilePath(Viewer.CurrentFile);
|
OpenDialog.InitialDir := ExtractFilePath(Viewer.CurrentFile);
|
||||||
|
OpenDialog.Filter := 'HTML Files (*.htm,*.html)|*.htm;*.html'; //might have changed
|
||||||
if OpenDialog.Execute then
|
if OpenDialog.Execute then
|
||||||
begin
|
begin
|
||||||
Update;
|
Update;
|
||||||
|
@@ -347,7 +347,9 @@ else OpenDialog.InitialDir := ExtractFilePath(ParamStr(0));
|
|||||||
{$ELSE} //Don't default to within app bundle.
|
{$ELSE} //Don't default to within app bundle.
|
||||||
else OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)) + '../../../';
|
else OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)) + '../../../';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
OpenDialog.FilterIndex := 1;
|
//OpenDialog.FilterIndex := 1; //Form's Filter wasn't right, so set here
|
||||||
|
OpenDialog.Filter := 'HTML Files (*.htm,*.html)|*.htm;*.html'+
|
||||||
|
'|All Files (*.*)|*.*';
|
||||||
if OpenDialog.Execute then
|
if OpenDialog.Execute then
|
||||||
begin
|
begin
|
||||||
FrameViewer.LoadFromFile(OpenDialog.Filename);
|
FrameViewer.LoadFromFile(OpenDialog.Filename);
|
||||||
|
Reference in New Issue
Block a user