Jump to content

Transparent body TUniFrame possible?


Stressman

Recommended Posts

  • 2 years later...

Hi,

 

You can use 1x1 px (semi/full transparent) png image, I had test it and it works fine:

.trnsprnt
{
 background-image: url("http://3msoft.net/trns.png") !important;
 background-color: rgba(0, 0, 0, 0) !important
}

And on a panel or frame use (clientside events):

function added(sender, container, pos, eOpts)
{
  sender.addBodyCls('trnsprnt');
}

If you want to change transparent % just change the .png transparent.

 

I hope this help you...

Link to comment
Share on other sites

What does Transparent mean here? Same color as background?

 

I'm not sure what Stressman asks for but with "transparent", I mean a TUniframe with background is not filled but it acts like fully transparent rectange that holds child component.s

 

It's like bodyStyle: 'background:transparent;".

 

 

The reason I started to think I need this kind of feature, I've a TUniHTMLFrame placed in a TUniFrame. I have added Drop-shadow effect using CSS to TUniHTMLframe. 

 

So it works, I can see the shadow effect on the TuniHtmlFrame but the components behind(?) them looks strange since the frame itself is also solid.

 

This is the topic:

http://forums.unigui.com/index.php?/topic/5948-how-to-create-drop-shadow-for-a-panel-or-htmlframe/

 

 

 

I just thought, if the TUniFrame was transparent, I could see the drop-shadow effect on the components of main from. (light blue area)

 

 

05xdF.jpg

 

 

 

This is the how the components look like.

 

 

7Ziah.jpg

Link to comment
Share on other sites

I understand.

 

I resolved this issue by mapping Delphi's clNone color to web Transparent color. This will work for all components with Color property.

 

This feature will be available in next build.

 

Now my drop shadow works perfectly. Thanks for the new version Farshad. (0.99.80.1227)

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...