HTMLView Library

dzt

Active Member
Licensed User
Hello,

@alfcen
Please allow me a selfish query: is it possible to disable the scrollbars irrespective of page size?

This would allow playing Flash shows at maximum size in both portrait landscape mode.

Yes it is possible. Although there is not a property or function to do that, you can create a big enough dzHTMLView control to host the content. Add it to a Panel, so you can control the visible part, and give appropriate values to Left and Top to center it. Note that Left and Top can get negative values.


For example:
hc.New1("Panel1", -30,-30, 600, 600)

There are also two properties to help you get the actual page size.
LayoutHeight and LayoutWidth.


@specci48 (why not 47 or 49?):)

First of all thank you for trying my library.

Although I'm using Basic4PPC for professional reasons, I realy enjoy it. This forum too. Part of this is my posts here.

The libraries I've posted are developed mainly for my own use and just share them (The enjoyment that I said). I also provide sample files trying to show all the functionality.

On the contrary I do not enjoy by no means, writing help files. I prefer to use these minutes to provide more samples or more libraries.

So please forgive me and I promise to try harder in the future!;)
 

specci48

Well-Known Member
Licensed User
Longtime User
Hi dzt,

no problem. :)
Just take my post as a hint, wish...

@specci48 (why not 47 or 49?):)
Isn't it obvious? Have a look at my avatar!
My first computer was a Sinclair ZX Spectrum 48K. :cool: Or should i better have named myself specci48k ??? ;)


specci48
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Dimitris
On a panel! Yes, of course, Why didn't I think of that? :sign0013:
Thanks a lot for the tip.
Cheers
Robert
 

agraham

Expert
Licensed User
Longtime User
As you may have noticed I am putting together help files for dzts' libraries.

Attached is a shell for the dzHtmlView library.

I am not a Webby or HTML person - in fact I have avoided such things like the plague as I am a low-level Systems Designer really and never wanted to dirty my hands with this presentational text-based stuff.:)

Therefore I would be grateful if anyone who is familiar with this library could give some one-liners about the methods, properties and events to get me started. Don't worry about style, grammar, spelling or format it's content I'm interested in. I just want something to get me up the learning curve of what this library is and how and when to use its functions so I don't have to spend too much time researching it myself. This stuff can take over your life if your not careful!:(
 

Attachments

  • dzHTMLViewHelp.zip
    6.7 KB · Views: 86

mctroen

New Member
snapshot and move ???

hi all,
very nice work dzt !
I just wanted to know:
1 - if there is a way to move the origin(x,y) of the control during runtime ?
2 - is it possible to get a graphic snapshot (to paste in a picture) of the html viewer box only and how ?
Thank you if you can help me.

Stephane
 

dzt

Active Member
Licensed User
Hello Stephane,

1. Yes. Add the dzHTMLView control on a same size panel, and during runtime move the panel by changing it's Left and Top properties. See also post #21 (same thread).
2. During runtime I suppose. No I'm afraid not.
 

mctroen

New Member
Thank you for that VERY very quick answer.
For the snapshot, I was thinking to a CANVAS CLASS copy of the control or something like that. Well that's bad for my project.
Thanks again.
Stephane
 

alfcen

Well-Known Member
Licensed User
Longtime User
Refresh of HTMLView

Haisai Dimitris,
I am using your HTMLView to download weather data.
The routine gets the data, saves a HTM file which is then viewed in HTMLView. Problem being, pressing imgButtCurrent (to update weather data) results in a blank HTMLView. Could that be related to the Pocket IE cache or to my old PPC2003 o/s? In most cases, however, I am overlooking something.
Nothing life-critical :)

B4X:
Sub imgButtCurrent_Click
  GetDataOnline
  If offline = false Then
    ParseCurrent(ht)
    imgButtHead.Text ="Current Weather (online)"
  Else
    imgButtHead.Text ="Current Weather (saved)"
  End If
  If FileExist("current.htm") = false Then Return
  If cPPC Then
    hc.Clear
    hard.GCCollect
    hc.Navigate("file://" & AppPath & "\current.htm")
  Else
    Shell(browser, AppPath & "\current.htm")
  End If
End Sub
 

colin9876

Active Member
Licensed User
Lets write a decent Internet Browser

I downloaded the example - it works well, just looks complicated!

I think theres an option here to write a very successful program that, lets face it, is well overdue with the inadiquacies of the current IE.

Would it be possible to write a Internet Browser like Safari (on the iphone)? I experimented with writing some Touch flow type routines to scroll a picture the other day, (u can do most things except the two finger expands).
Anyway most features are possible with Basic4ppc

If I wanted a feature that will show the whole internet page on my pda is that possible? (Yes I understand 800x600 etc will look tiny on 320x240) but then you could expand the area ur interested in?
Does the internet page come as a data stream or a file or a picture? Would it be possible to write a routine to just plot say every 3rd pixel to get the whole page on the screen
 

dzt

Active Member
Licensed User
Haisai Robert,

I don't know what is the problem. And I don't have a PPC 2003 to test it.
Here works fine.

Attached is a small example.
Please test it and be so kind to post the results:)

Cheers
 

Attachments

  • test11_alfcen.zip
    1.7 KB · Views: 26

alfcen

Well-Known Member
Licensed User
Longtime User
Yasou Dimitris,

Thanks so much for the test code. The problem remains and I am almost sure it is inherent to the device.

Please test it and be so kind to post the results

Haha, ok, here you go...
"Tenki" is Japanese for Weather and a candidate for the next Open Source project.

Cheers
Robert
 

colin9876

Active Member
Licensed User
Re ask about data stream

I posted (3 back) if it would be possible to display the whole internet page on the 320x240 screen - so u could then zoom in after?

No one answered - can anyone help?

Really I wanted to know in what form the web page data comes in (file,stream, etc????), what is the raw width of a downloaded page (e.g. 1000 pixels) and if it would be possible to just write a lib to plot every 3rd point say to get it on the whole screen?
 

dzt

Active Member
Licensed User
...if it would be possible to display the whole internet page on the 320x240 screen - so u could then zoom in after?...

Hi,

Actually this lib is a wrapper for the native HTMLView control used by Pocket Internet Explorer.
As you can see from the samples you can't deal at all with the downloaded data. There is only a ZoomLevel property (0-4) you can use.

The hard way is to use HTTP library to download web pages. But in this case you should parse HTML by yourself.
 

Georg

Member
Licensed User
Longtime User
Desktop Version

I can try what i wont, but on the desktop i have only a green background, but it works on the device very well

George
 

Georg

Member
Licensed User
Longtime User
htmlViem compile error

when i use dzhtmlview and compile the script with optimized compilation I get the error compiling program cs0246 typ or namespace couln't be found. What's wrong?
 
Top