dantheinfoman
Programmer
Hi All,
I've been trying to manipulate foxypreviewer's toolbar all day and I can't get it to budge for customization. I'm trying to add an option to the SAVE toolbar to allow "Save As XLS (Basic)" which would hopefully create an Excel file that loads really really fast. Or an option to Save as TXT or CSV. Something that would make saving huge reports go quicker.
Even if I comment out the whole section from Foxypreviewer.prg that talks about building the toolbar (below) it still is unchanged when I build and reopen the program. This is what makes me think the toolbar is coming from somewhere else secretly and GoFish4.app isn't finding anywhere else the toolbar could be coming from.
Please advise if you know anything about this mystery.
Thanks
Dan
I've been trying to manipulate foxypreviewer's toolbar all day and I can't get it to budge for customization. I'm trying to add an option to the SAVE toolbar to allow "Save As XLS (Basic)" which would hopefully create an Excel file that loads really really fast. Or an option to Save as TXT or CSV. Something that would make saving huge reports go quicker.
Even if I comment out the whole section from Foxypreviewer.prg that talks about building the toolbar (below) it still is unchanged when I build and reopen the program. This is what makes me think the toolbar is coming from somewhere else secretly and GoFish4.app isn't finding anywhere else the toolbar could be coming from.
Code:
****EVEN IF THE FOLLOWING IS COMMENTED OUT, IT ACTS AS NORMAL?!?!****
IF _goFP.lPrintVisible
* Save to file item
IF _goFP.lSaveToFile
DEFINE BAR 17 ;
OF (m.cPopup) ;
PROMPT _goFP.GetLoc("SAVEREPORT") ;
PICTURE This.IMGBTN_SAVE
LOCAL lcSaveMenu
m.lcSaveMenu = SYS(2015)
DEFINE POPUP (m.lcSaveMenu) SHORTCUT RELATIVE
IF NOT _goFP.lCompleteMode && Original report
WAIT WINDOW 'not completemode'
* If the report is "Searchable", show the submenu
* Otherwise, allow only to save as image
IF _goFP._lCanSearch
ON BAR 17 OF (m.cPopup) ACTIVATE POPUP &lcSaveMenu.
* 2012-08-17 allow omitting the file type icons
IF _goFP.lShowFileFormatIcons
IF _goFP.lSaveAsImage
DEFINE BAR 1 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASIMAG") PICTURE "pr_Img.bmp"
ON SELECTION BAR 1 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(1)
ENDIF
IF _goFP.lSaveAsPDF
DEFINE BAR 2 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASPDF") PICTURE "pr_Pdf.bmp"
ON SELECTION BAR 2 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(2)
ENDIF
IF _goFP.lSaveAsRTF
DEFINE BAR 5 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASRTF") PICTURE "pr_Word.bmp"
ON SELECTION BAR 5 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(4)
ENDIF
IF _goFP.lSaveAsXLS
DEFINE BAR 6 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASXLS") PICTURE "pr_Excel.bmp"
ON SELECTION BAR 6 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(5)
ENDIF
IF _goFP.lSaveAsHTML
DEFINE BAR 3 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASHTML") PICTURE "pr_Html.bmp"
ON SELECTION BAR 3 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(3)
ENDIF
IF _goFP.lSaveAsMHT AND (_goFP.lCompleteMode = .F.)
DEFINE BAR 4 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASMHT") PICTURE "pr_MHT.bmp"
ON SELECTION BAR 4 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(8)
ENDIF
ELSE
IF _goFP.lSaveAsImage
DEFINE BAR 1 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASIMAG")
ON SELECTION BAR 1 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(1)
ENDIF
IF _goFP.lSaveAsPDF
DEFINE BAR 2 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASPDF")
ON SELECTION BAR 2 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(2)
ENDIF
IF _goFP.lSaveAsRTF
DEFINE BAR 5 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASRTF")
ON SELECTION BAR 5 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(4)
ENDIF
IF _goFP.lSaveAsXLS
DEFINE BAR 6 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASXLS")
ON SELECTION BAR 6 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(5)
ENDIF
IF _goFP.lSaveAsHTML
DEFINE BAR 3 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASHTML")
ON SELECTION BAR 3 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(3)
ENDIF
IF _goFP.lSaveAsMHT AND (_goFP.lCompleteMode = .F.)
DEFINE BAR 4 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASMHT")
ON SELECTION BAR 4 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(8)
ENDIF
ENDIF
ELSE
ON SELECTION BAR 17 OF (m.cPopup) ;
m.oRef.ExtensionHandler.DoSaveType(1)
ENDIF
ELSE
ON BAR 17 OF (m.cPopup) ACTIVATE POPUP &lcSaveMenu.
IF _goFP.lSaveAsImage
DEFINE BAR 1 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASIMAG") PICTURE "pr_Img.bmp"
ON SELECTION BAR 1 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(1)
ENDIF
IF _goFP.lSaveAsPDF
DEFINE BAR 2 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASPDF") PICTURE "pr_Pdf.bmp"
ON SELECTION BAR 2 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(2)
ENDIF
IF _goFP.lSaveAsHTML
DEFINE BAR 3 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASHTML") PICTURE "pr_Html.bmp"
ON SELECTION BAR 3 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(3)
ENDIF
IF _goFP.lSaveAsMHT AND (_goFP.lCompleteMode = .F.)
DEFINE BAR 4 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASMHT") PICTURE "pr_MHT.bmp"
ON SELECTION BAR 4 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(8)
ENDIF
IF _goFP.lSaveAsRTF
DEFINE BAR 5 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASRTF") PICTURE "pr_Word.bmp"
ON SELECTION BAR 5 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(4)
ENDIF
IF _goFP.lSaveAsXLS
DEFINE BAR 6 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASXLS") PICTURE "pr_Excel.bmp"
ON SELECTION BAR 6 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(5)
ENDIF
IF _goFP.lSaveasTXT && Create menu option Save as TXT && 11/08/2010 by mauriciobraga@ig.com.br
DEFINE BAR 7 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASTXT") PICTURE "pr_1page.bmp"
ON SELECTION BAR 7 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(6)
ENDIF
**ds test
DEFINE BAR 8 OF (m.lcSaveMenu) PROMPT _goFP.GetLoc("SAVEASMHT") PICTURE "pr_MHT.bmp"
ON SELECTION BAR 8 OF (m.lcSaveMenu) m.oRef.ExtensionHandler.DoSaveType(8)
ENDIF
ENDIF
Thanks
Dan