Nesting Preview windows for PDF, Word and Excel

I have an App where I am using ChromeExplorer to display URL links, File Manager to display PDF files, and I plan to add Noyantis Suite controls Preview window to display Excel and Word documents. I am looking for a way to have all three of the preview windows set up in the same location on a browse window and depending on which file type is selected it will display on the proper preview window.

The question is how do I make the three preview windows seem like one and how can I set it up so the line in my browse window knows which one to pick based on the file type.

What I did with TXText control and Leonids wrapper TX Text Control (klarisoft.com) because this handled pdf & word docs and html, was I had a browse on the left and a scalable thumbnail image of the document showing on the right.

As it was an image, it was faster to load, and when ever a document was linked into my app or created within my app, it created a scalable thumbnail image for this purpose.

This way when scrolling in the browse, it was fast enough to run over an unmanaged switch network pulling the image files off the server and the browse hilight bar scrolled as fast as if there was no image to display.

In my experience, once you start having multiple viewers for documents on a sheet control with each viewer on its own tab, the user cant scroll up or down or page up or down as quickly in my experience.

One other trick which helps to avoid pulling files down which are never going to be shown, is to place the code that displays the image, but you could use this for the viewers if you still want to go the viewer route, is on the window timer.

So when the browse box has rested on a record in the browse, after a few tens of milliseconds, it pulled the image (or could display the viewer). I found a second was too long to wait before showing the image, and about half a second sometimes was too quick. The problem was some users press and hold the arrow keys when scrolling whilst others would press the up or down arrow key once then lift their finger up and then press the arrow key again, what I call slow scrolling. This half second meant slow scrolling users would end up pulling the images down when they didnt want/need to, which then congested the network. You get plenty of users doing this at the same time and your network basically experiences a Distributed Denial Of Service of sorts, it then slowed all users down.

I didnt spend any time writing code working out their scrolling pattern and adjusting the timer interval to suit, but it is a factor which could have been coded for, but if you choose to put the code in a timer event to wait for a few tens of a millisecond before displaying something, this will help reduce network congestion. Otherwise users could be on the phone to you, when they are at their busiest and wont be happy at all with the speed of your app. I speak from experience on this one!

Hi Steve,

Docking Panes - that’s how you do it :slight_smile:

You could have separate child preview windows (for different content types). You define a pane for each preview window (to host the child window), and put each in the same collection - also, add the option on the pane definition to hide other panes the collection when selected.

Then, select the appropriate pane for the appropriate piece of content, the others will auto hide - giving the effect that just one previewer handles all the content :slight_smile:

I can demo it to you during Monday’s webinar if you like?

Thanks,

Andy

1 Like

Dries Driessen did a presentation for CIDC 2020 on what he described as “Donut Holes.”

He was able to display, in a “parent” window, one or more child windows from different threads. It’s a really cool idea.

If I get this issue correctly, I would put all controls one over the other and then unhide the proper one based on record in the browse, i do that a lot with image previews (image control) and video previews (ole control). So it is all in the same window.

1 Like

Andy, That would be great, but I still need the issue with the ?Preview window in Suite controls resolved.

Our entire app is based on the donut hole thing - always has been. It’s a lot of work.

I had a pile of trouble getting TxText to display Word/Excel in a manner worth using (yes, we have Klarisoft’s wrapper - it wasnt their problem).

Cowboy once wrote a thing to deal with this because it had similar impacts on SQL servers. I think all he really did was skip the child lookup (or similar for a TxText display) if the keypresses / scrolls continued inside a certain time window.