Question about Webgadget, border

Just starting out? Need help? Post your questions and find answers here.
StoneOakvalley
Posts: 35
Joined: Tue Apr 05, 2016 2:14 pm
Location: Norway
Contact:

Question about Webgadget, border

Post by StoneOakvalley »

So, naturally WebGadget in Spiderbasic is just an IFrame, correct?
So how can I control the frameborder="0" to the Webgadget?

I want to control the iframe border, even colors for that. Mostly, the option for turning it off completely.

InlineJS, Css magic within the SpiderBasic code?
Registered owner of PureBasic and SpiderBasic :-) Good stuff!
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Question about Webgadget, border

Post by Peter »

StoneOakvalley wrote:So, naturally WebGadget in Spiderbasic is just an IFrame, correct?
it's an IFrame inside a Div. And the Div has the border (Class: 'sbWebBorder').

Removing the border:

Code: Select all

If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  WebGadget(0, 10, 10, 580, 280, "http://www.spiderbasic.com")
EndIf

WB = GadgetID(0)

! $(v_wb.div).removeClass("sbWebBorder");
Greetings ... Peter
StoneOakvalley
Posts: 35
Joined: Tue Apr 05, 2016 2:14 pm
Location: Norway
Contact:

Re: Question about Webgadget, border

Post by StoneOakvalley »

Ahh, excellent, worked as intended. Thanks!
Registered owner of PureBasic and SpiderBasic :-) Good stuff!
StoneOakvalley
Posts: 35
Joined: Tue Apr 05, 2016 2:14 pm
Location: Norway
Contact:

Re: Question about Webgadget, border

Post by StoneOakvalley »

Seems I have problems trying to identify the actual CSS used for the ButtonImageGadget().
Is there a override for turning/controlling the border around that too similar to your solution for WebGadgets?

ButtonImageGadget(0, 10, 10, 100, 83, ImageID(0))

To me, since SB is web application based, every gadget should have the flag #PB_Border applied to them. Some gadgets have that option already, even from PureBasic legacy, (calender, textgadget, containergadget etc). Fred, what's your opinion on that, every gadget gets the #PB_Border would be nice :-)
Registered owner of PureBasic and SpiderBasic :-) Good stuff!
Post Reply