This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, September 30, 2009 1:29:45 AM(UTC)
Groups: Registered
Posts: 23
Hi,
I am using Document Imaging V14.5 & Delphi as interface. In my application, I have to implement "Save As" behavior. My Image is opened and I pressed "Save As" button. It will open a dialog box. Following is the code I used:
*****************************************************
LeadDialog1.DialogTitle:= 'Save File As';
LeadDialog1.MaxFileTitleSize:= 0;
LeadDialog1.MaxFileSize:= 0;
LeadDialog1.DlgFileFlags:= 0;
LeadDialog1.DlgFlags:= DLG_SAVE_SHOW_FILEOPTIONS_PROGRESSIVE;
LeadDialog1.LEADImage:= LEADImage1;
nRet:= LeadDialog1.ShowSaveDlg(Self);
*****************************************************
ShowSaveDlg() function opens dialog to save the file. There is a drop down menu "Save Type As" in the dialog box to select the type. This drop down list has lots of options, out of which I need only few.
I need only bmp, jpg & tif file options in the drop down menu.
How I can remove other options from the drop down menu?
Thanks & Regards,
Manoj Kumar
#2
Posted
:
Wednesday, September 30, 2009 4:57:35 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
You can do this by using the LEADDlgFile1.FileFormatsCount and LEADDlgFile1.FileFormats properties. For example, the following code shows how to show only LEAD CMP and TIFF formats in the save As dialog:
=============
LEADDlgFile1.DialogTitle:= 'Save A File';
LEADDlgFile1.FileName:= '';
LEADDlgFile1.FileFormatsCount:= 2;
LEADDlgFile1.FileFormats [0].Format:= DLG_FF_SAVE_LEAD;
LEADDlgFile1.FileFormats [0].BppCount:= 1;
LEADDlgFile1.FileFormats [0].FormatBpp [0]:= 24;
LEADDlgFile1.FileFormats [0].SubFormats [0]:= DLG_FF_SAVE_SUB_CMP_NONPROGRESSIVE + DLG_FF_SAVE_SUB_CMP_PROGRESSIVE;
LEADDlgFile1.FileFormats [1].Format:= DLG_FF_SAVE_TIFF;
LEADDlgFile1.FileFormats [1].BppCount:= 1;
LEADDlgFile1.FileFormats [1].FormatBpp [0]:= 24;
LEADDlgFile1.FileFormats [1].SubFormats [0]:= DLG_FF_SAVE_SUB_TIFF1_CCITT + DLG_FF_SAVE_SUB_TIFF1_CCITT_G3_1D +
DLG_FF_SAVE_SUB_TIFF1_CCITT_G3_2D + DLG_FF_SAVE_SUB_TIFF1_CCITT_G4 +
DLG_FF_SAVE_SUB_TIFF1_UNCOMPRESSEDRGB + DLG_FF_SAVE_SUB_TIFF1_RLERGB +
DLG_FF_SAVE_SUB_TIFF1_LZWRGB + DLG_FF_SAVE_SUB_TIFF1_JBIG;
LEADDlgFile1.SaveFileTypeIndex:= DLG_FF_SAVE_LEAD;
LEADDlgFile1.SaveSubTypeIndex:= DLG_FF_SAVE_SUB_CMP_PROGRESSIVE;
LEADDlgFile1.MaxFileTitleSize:= 0;
LEADDlgFile1.MaxFileSize:= 0;
LEADDlgFile1.DlgFileFlags:= 0;
LEADDlgFile1.DlgFlags:= DLG_SAVE_ENABLESIZING +
DLG_SAVE_SHOW_FILEOPTIONS_MULTIPAGE +
DLG_SAVE_SHOW_FILEOPTIONS_PROGRESSIVE +
DLG_SAVE_SHOW_FILEOPTIONS_QFACTOR +
DLG_SAVE_SHOW_FILEOPTIONS_STAMP +
DLG_SAVE_SHOW_FILEOPTIONS_BASICJ2KOPTIONS +
DLG_SAVE_SHOW_FILEOPTIONS_J2KOPTIONS +
DLG_SAVE_SHOW_FILEOPTIONS_JBIG2OPTIONS;
LEADDlgFile1.LEADImage:= LEADImage1;
nRet:= LEADDlgFile1.ShowSaveDlg (Self);
=============
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.