Page 1 of 1
Webgadget question
Posted: Thu Jun 19, 2008 1:52 pm
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..
Posted: Thu Jun 19, 2008 2:06 pm
by Edwin Knoppert
For html you can use a frameset instead.
You would have control over the scrollbars.
Posted: Fri Jun 20, 2008 8:33 pm
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
Posted: Fri Jun 20, 2008 9:27 pm
by rsts
Mr Byte is correct (as usual).
I do displays without scrollbars regularly.
cheers
Posted: Sat Jun 21, 2008 8:42 am
by mlohnen
Thanks guys for helping me out on this!
Posted: Sun Jun 22, 2008 9:43 pm
by utopiomania
Code: Select all
<body scroll="auto">
<body scroll="no">
Another way to ge t rid of th the vertical scrollbar.
