Webbrowser    Zurück


Dieses Programm ist ein kleiner Browser fürs Internet. Es stammt aus den Beispielprogrammen von Gambas.




So schaut der Code aus:

' Gambas class file

PUBLIC SUB Form_Resize()

txtLink.Move(0, 0, ME.ClientW)

webTest.Move(0, txtLink.H, ME.ClientW, ME.ClientH - txtLink.H - lblLink.H)

lblLink.Move(0, webTest.Y + webTest.H, ME.CLientW)

END

PUBLIC SUB webTest_Change()

txtLink.Text = LAST.Path

'DEC Application.Busy

END

PUBLIC SUB webTest_Click()

txtLink.Text = " " & LAST.Link

'INC Application.Busy

END

PUBLIC SUB webTest_Link()

lblLink.Text = LAST.Link

END

PUBLIC SUB txtLink_Activate()

DIM sPath AS String

sPath = txtLink.Text

IF NOT (sPath LIKE "http://*") THEN sPath = "http://" & sPath

webTest.Path = Trim(sPath)

END

PUBLIC SUB Form_Open()

txtLink.Text = "http://gambas.sourceforge.net"

txtLink_Activate

END



From: <njmurphy1@co...>

Re: BUG in using WRITE #hFILE

2005-02-13 22:58





Hi H.R. ter Veer

When I was a small boy my grandfather taught me a great lesson. "Everything

is easy when you know how."

I am sitting in my easy chair with my laptop on my lap playing with Gambas

and used what I wanted to do with the html file as a learning tool for

Gambas. And I did learn something. It looks like Gambas uses Pascal style

strings and not C strings internally. I used both WRITE and PRINT and saw

that there was a difference with the results and wondered why.

Maybe you could help me with something Veer. I would like to use the

webbrowser in gb.qt.kde.html but when I use the example in the docs it does

not work. I get an "Unknown Identifier" error for WebBrowser. I suspect

that gb.qt.kde.html is not loaded but I don"t see how to load it.

TIA

Joseph









From: H.R. ter Veer <terveer@ly...>

Re: BUG in using WRITE #hFILE

2005-02-13 23:32





On Sun, 13 Feb 2005 22:58:45 -0800

njmurphy1@co... wrote:

Hi Joseph,

To add components to a project, use the menu Project / Properties & Tab Components.

(This doesn"t work on the example projects since they are read-only)

To test it, create a new project, add the gb.kde.html component.

After that a button KDE appears in the toolbox which holds the kde components.

(& the browser) add a webbrowser to your form use the webbrowser.path propeory to load the

url.

for example:

--- FORM1.class ---

PUBLIC SUB form_resize()

webbrowser1.x = 0

webbrowser1.y = 0

webbrowser1.W = ME.ClientW

webbrowser1.H = ME.ClientH

END

PUBLIC SUB Form_Open()

webbrowser1.Path = "http://www.google.com"

END

--- - - -

If all this doesn"t work, then there might be something missing in your installation.

Good luck!

Harm Richt ter Veer

> Hi H.R. ter Veer

>

> When I was a small boy my grandfather taught me a great lesson. "Everything

> is easy when you know how."

>

> I am sitting in my easy chair with my laptop on my lap playing with Gambas

> and used what I wanted to do with the html file as a learning tool for

> Gambas. And I did learn something. It looks like Gambas uses Pascal style

> strings and not C strings internally. I used both WRITE and PRINT and saw

> that there was a difference with the results and wondered why.

>

> Maybe you could help me with something Veer. I would like to use the

> webbrowser in gb.qt.kde.html but when I use the example in the docs it does

> not work. I get an "Unknown Identifier" error for WebBrowser. I suspect

> that gb.qt.kde.html is not loaded but I don"t see how to load it.

>

> TIA

> Joseph

>

>

>

> -------------------------------------------------------

> SF email is sponsored by - The IT Product Guide

> Read honest & candid reviews on hundreds of IT Products from real users.

> Discover which products truly live up to the hype. Start reading now.

> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

> _______________________________________________

> Gambas-user mailing list

> Gambas-user@li...

> https://lists.sourceforge.net/lists/listinfo/gambas-user

>

--

------------------------------------------------------------------

Cast the calming apple

Up and over satellites

To draw out the timid wild one

To convince you it"s alright

And I listen for the whisper

Of your sweet insanity while I formulate

Denials of your affect on me

You"re a stranger

So what do I care

You vanish today

Not the first time I hear

All the lies

What am I to do with all this silence

Shy away, shy away phantom

Run away terrified child

Won"t you move away you fucking tornado

I"m better off without you

Tearing my will down

-------------------------------------------- a Perfect Circle ----