Re: Transparent window misunderstood
Re: Transparent window misunderstood
- Subject: Re: Transparent window misunderstood
- From: Lorenzo <email@hidden>
- Date: Wed, 14 Sep 2005 19:03:06 +0200
In order to see a transparent web page within a WebView you have to add the
code
<STYLE type="text/css">
BODY { background-color: transparent }
</STYLE>
in the HEAD section of the web page itself.
Also in the source code you have to add the line
[aWebView setDrawsBackground:NO];
XCode will tell you that API cannot be assigned to a WebView, but it will.
I will send you a Xcode project so you can see any detail.
Best Regards
--
Lorenzo
email: email@hidden
> From: Kevin Kicklighter <email@hidden>
> Date: Wed, 14 Sep 2005 11:20:11 -0400
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Transparent window misunderstood
>
> Why must the internal webView must be transparent ? I want to see
> the webView (alpha = 1.0).
> The setBackgroundColor is not a valid method for webView, tried it
> anyway and of course it doesn't work. WebView inherits from NSView.
>
> Kevin
>
>
> On Sep 14, 2005, at 2:48 AM, Lorenzo wrote:
>
>> Kevin,
>> more than the window, you have to make the internal webView
>> transparent too.
>>
>> [webView setBackgroundColor:[NSColor colorWithCalibratedWhite:0.0
>> alpha:0.0]];
>>
>> and since I presume that the webView is embedded within a
>> NSScrollView,
>> you have to make the [webView enclosingScrollView] transparent too.
>>
>> [[webView enclosingScrollView]setBackgroundColor:
>> [NSColor colorWithCalibratedWhite:0.0 alpha:
>> 0.0]];
>>
>> tell me whether it worked.
>>
>> Best Regards
>> --
>> Lorenzo
>> email: email@hidden
>>
>>
>>> From: email@hidden
>>> Reply-To: email@hidden
>>> Date: Tue, 13 Sep 2005 16:25:05 -0700 (PDT)
>>> To: email@hidden
>>> Subject: Cocoa-dev Digest, Vol 2, Issue 1363
>>>
>>> ------------------------------
>>>
>>> Message: 6
>>> Date: Tue, 13 Sep 2005 15:38:24 -0400
>>> From: Kevin Kicklighter <email@hidden>
>>> Subject: Transparent window
>>> To: email@hidden
>>> Message-ID: <email@hidden>
>>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>>>
>>> I'm trying to use the WebKit to render web pages to the screen but
>>> without a window background. I can make an NSWindow that is
>>> borderless (I don't need any window controls) and can do the
>>> loadRequest into the main frame, display it and set the alpha value.
>>> The only problem is that I can still see the background white
>>> window , that the web page was put onto, which I don't want to see.
>>> Can anyone tell me how to make the base image on the window
>>> transparent, while the view that's placed in it is opaque?
>>>
>>> Thanks,
>>> Kevin.
>>>
>>
>>
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden