Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide report preview titlebar

Status
Not open for further replies.

ameedoo3000

IS-IT--Management
Sep 20, 2016
233
EG
hi
how can i hide the titlebar of report preview
 
If you don't get anywhere with settings, it's time to please move to forums, where foxypreviewer users and developers may help you.

Bye, Olaf.
 
I looked into sources, and FoxyPreviewer is respecting an IN WINDOW clause, the window just has to be a top level form for this to work.

Code:
Do foxypreviewer.app
loPV = CreateObject("previewform")
loPV.Show()
Report form myreport.frx preview in Window PreviewWindow

The previewform class has to be a form class you define with ShowWindow set to 2 and Name set to PreviewWindow.

Bye, Olaf.
 
this message is appear is
888_bshykz.jpg
 
I said:

myself said:
The previewform class has to be a form class you define with ShowWindow set to 2 and Name set to PreviewWindow.
So you have to define such a form class. You can't set a form you create via CREATEOBJECT("form") As top level form after it already is created, it has to be set as top level form beforehand.
If you don't know how to create a form class learn it, or create a normal SCX form and set it as necessary, then start it with DO FORM previewWindow.

Bye, Olaf.

 
OK, now finally looking deeper into FoxyPreviewer sources. There is a place where it states it respects an IN WINDOW clause. It actually does, but in another way as thought:

Code:
case not empty( THIS.oReport.commandClauses.InWindow )
	*--------------------------------------------
	* Determine the kind of host window:
	*--------------------------------------------
	local host
	host = THIS.getWindowRef( THIS.oReport.commandClauses.InWindow )		

	if not isnull( m.host ) 
		*--------------------------------------------
		* Make sure it is active:
		*--------------------------------------------
		activate window (THIS.oReport.commandClauses.InWindow)
	endif
	
	release host

This code runs and in short means the preview window you pass in via IN WINDOW clause is respected. I single stepped through this code and host is not null, so the ACTIVATE WINDOW runs. Nevertheless following code creates a new preview form inside that preview window. It is not possible to change that, as this preview form class has lots of functionality FoxyPreviewer needs.

Your only chance to get rid of that titlebar is to change the FoxyPreviewer code.

There are two big downsides, though:
1. The toolbar itself still has the title you so absolutely don't want to see
2. Once the titlebar is removed, if you close the toolbar you can only exit the preview with ESC and if you disable ESC as some applications have good reasons to do, you have no way out.

So overall there are very good reasons VFPs preview mechanism is as it is.

If you want to try, go into the download, open up foxypreviewer.pjx from the folder Sources. In the project manager go to the Classes tab, in the classlibrary treeview expand the frxPreview library (click on the [+]), select the frxBaseForm and finally click Modify. Now in the class designer open properties window, if it isn't open all the time already and set Titlebar = 0 in there. Save.

Recompile via the project managers Build button as APP and use that modified app.

Bye, Olaf.



 
Hi,

Would it not be simpler to adjust the class? Or even better subclass and add a property to control the Titlebar ON/OFF?
Screendump3_pztgio.png


Regards,

Jockey(2)
 
>Would it not be simpler to adjust the class?
I told how to do that, didn't I? Changing frxBaseForm will change all the different preview forms FoxyPreviewer uses in different situations and would be more appropriate than changing frxpreviewform.

Yes you could dig as deep as creating a new property reflecting in _screen.oFoxyPreviewer configuration object and config data, but I am not eager digging that deep.

In the first place try the titlebar modification, ameedoo3000, and then see, if that satisfies you.

Bye, Olaf.

 
i did not have FRXPreviewForm or FRXPreview.VCX . how can i download it ?
 
All foxypreviewer downloads I have come as a ZIP containing both the major app to use standalone and rightaway, but also include sources.

As said:
myself said:
open up foxypreviewer.pjx from the folder Sources
Unzipping FoxyPreviewer v299z35.zip you get a folder Sources, where sources of the app are located.

You should look back into your downloads folder.
Even if you have removed that dowanload, simlpy do it again.

Bye, Olaf.

 
Inconsistencies and mistakes happened
Please explain the steps (step by step) How to use foxypreviewer.pjx class Libraries in New_form and codes exactly
and which class insert into the New_form frxbaseform or frxpreviewform
aa_gpmxhy.png
bb_mt1pjy.png
 
I told you what to do, just very few steps:

myself said:
go to the Classes tab, in the classlibrary treeview expand the frxPreview library (click on the [+]), select the frxBaseForm and finally click Modify. Now in the class designer open properties window, if it isn't open all the time already and set Titlebar = 0 in there. Save.

Just change one class, one property, that's all. You just change titlebar of the frxBaseForm.

Then I said:
myself said:
Recompile via the project managers Build button as APP and use that modified app.

You just change one property of one class.
You still keep this project a separate project and compile the foxypreviewer.app again, that's all there is to it. You don't add your employee report into this project.

What is so difficult?

Bye, Olaf.

 
Thank you very much, I am unable to thank the extent that suits you, I've been exactly what I wanted and I learned a lot and a lot of you
I owe you all the best
I'm very happy

Untitled_bd4ggz.jpg
 
please . how can i get this report at the center . not on the left ?
 
Revisit the Foxypreviewer.pjx project, revisit the frxBaseForm and set the property AutoCenter to .T.

Bye, Olaf.
 
i found frxBaseForm already set AutoCenter to .T.
no i compile a new app and replace it in my project .
 
Ah, I didn't care to look.
The value is overriden in several forms, eg set to .F. in the frxPreviewForm.
Change all frxPreview... forms.
All forms except the gotopage form.
Always override AutoCenter to .T.

Bye, Olaf.
 
i set all forms (AutoCenter to .T.) except the gotopage form ... ok . but no change !
what ( eg set to .F. in the frxPreviewForm.) mean ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top