Webgadget question

Just starting out? Need help? Post your questions and find answers here.
mlohnen
New User
New User
Posts: 2
Joined: Sun Jun 08, 2008 5:02 pm
Location: Haarlem, Netherlands

Webgadget question

Post by mlohnen »

Hi All,

Just bought Purebasic and starting to learn.. here's my first question:

I'm using the webgadget to produce some kind of narrowcasting software.
Now I need to show webpages but without the scrollbar. How can I get that done? Now the vertical scrollbar shows up everytime, even when the webpage fits the current screen..
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

For html you can use a frameset instead.
You would have control over the scrollbars.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

This is a HTML issue rather than a problem of PB:

Code: Select all

OpenWindow(0,0,0,400,300,"",#PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
WebGadget(0,0,0,0,0,"")

HTML$ = "<html>"
HTML$ + "<head>"
HTML$ + "<title>No Scrolbar Demo</title>"
HTML$ + "<style>body {overflow-y:hidden;}</style>"
HTML$ + "</head>"
HTML$ + "<body>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "<p>Lorem ipsum dolor sit amet</p><p>Lorem ipsum dolor sit amet</p>"
HTML$ + "</body>"
HTML$ + "</html>"

SetGadgetItemText(0,#PB_Web_HtmlCode,HTML$)

Repeat
	EventID = WaitWindowEvent() 
	
	If EventID = #PB_Event_SizeWindow
		ResizeGadget(0,0,0,WindowWidth(0),WindowHeight(0))
	EndIf
Until EventID = #PB_Event_CloseWindow
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Mr Byte is correct (as usual). :)

I do displays without scrollbars regularly.

cheers
mlohnen
New User
New User
Posts: 2
Joined: Sun Jun 08, 2008 5:02 pm
Location: Haarlem, Netherlands

Post by mlohnen »

Thanks guys for helping me out on this!
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post by utopiomania »

Code: Select all

<body scroll="auto">
<body scroll="no">
Another way to ge t rid of th the vertical scrollbar. :)
Post Reply