View Issue Details

IDProjectCategoryView StatusLast Update
0002406JEDI VCL00 JVCL Componentspublic2005-02-04 05:11
ReporteranonymousAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version3.00 BETA 2 
Target VersionFixed in Version 
Summary0002406: JvOpenDialog on D5 - .FileName change is just ignored!
DescriptionI want File Open Dialog to suggest auto-generated names, though they can be
changed by user.
 
1st i wanted to change .FileName property from .OnShow event - it seems it
was not right place, and there is no event like .BeforeExecute.
Ok, so i added line like >>FileName := GenerateAutoName<< before calling
.Execute
 
And it did not worked either!
TOpenFilename record seems to be filled ok, but....
But the dialog, when shown, displays FileName set in Object Inspector (and
stored in DFM)
Will i revert to default TOpenDialog, that does not happen.
 
It seems, that TJvOpenDialog is enhancing TOpenDialog (talking of GUI) by
 1) adding Places Bar
 2) changing filename form TEdit to editable TComboBox
It also seems, that this ComboBox is filled by Windows from some MRU in
registry, ignoring lpstrFile member of TOpenFileName record.
I think, that newer OpenFileName record (TOpenFileName2000) can have some
member to fill that combobox ?
I also think that TJvOpenDialog could have some published property to revert
from ComboBox back to Edit ?
 
TagsNo tags attached.

Activities

anonymous

2004-12-20 03:20

viewer   ~0005938

PS: Delphi 5 Enterprise on Win2000 Server SP4 Rus

user72

2004-12-20 06:34

  ~0005954

// 1st i wanted to change .FileName property from .OnShow event
You can't change the filename from this event.

> so i added line like >>FileName := GenerateAutoName<< before calling .Execute
Don't know what you're doing. I just tested with this code and it works fine for me:


procedure TForm1.Button1Click(Sender: TObject);
begin
  // filename stored in DFM is "SomeFilename.txt"
  JvOpenDialog1.Filename := 'SomeOtherFilename.txt';
  ShowMessage(JvOpenDialog1.Filename);
  if JvOpenDialog1.Execute then // correctly shows "SomeOtherFilename.txt"
    ShowMessage(JvOpenDialog1.Filename); // correctly shows the selected file
end;

Maybe something wrong with your GenerateAutoName?

> I also think that TJvOpenDialog could have some
> published property to revert
> from ComboBox back to Edit ?
Don't know where or how this is changed, so can't add property for it

obones

2005-02-04 05:11

administrator   ~0006405

No answers for over a month, this issue is considered as resolved

Issue History

Date Modified Username Field Change
2004-12-20 03:16 anonymous New Issue
2004-12-20 03:20 anonymous Note Added: 0005938
2004-12-20 06:34 user72 Note Added: 0005954
2004-12-20 06:34 user72 Status new => feedback
2005-02-04 05:11 obones Status feedback => resolved
2005-02-04 05:11 obones Resolution open => not fixable
2005-02-04 05:11 obones Assigned To => obones
2005-02-04 05:11 obones Note Added: 0006405