Jump to content

CSS Problem


MarBar77

Recommended Posts

Hi,

 

I want to ask how can I override parent CSS from component level.

 

This is my case:

 

1) I have created new component based on TUniPanel for example I named it TMyUniPanel.

2) In TMyUniPanelk there are 2 panels inside

3) TMyUniPanel has for example white color, and two panels inside has for example black color.

4) I put this TMyUniPanel on unigui form without custom CSS stylization and it has those colors in runtime (and this is OK)

5) But in destination environment I have to put TMyUniPanel on TabSheet of TUniPageControl component and internal work area of TUniPageControl is stylized for example on yellow color, now in runtime all my Panels and TMyUniPanel have yellow color too.

6) So, I think to change class of my TMyUniPanel and I do that by adding component constructor 

ClientEvents.UniEvents.Add('aftercreate=function aftercreate(sender){sender.addCls(''onlPanel'');sender.addBodyCls(''onlPanel'');}');

but it doesn't help, panels are still yellow.

 

Is there any possibility to force that child control (TMyUniPanel) does not have parent CSS stylization? I don't want to use customCSS for every TMyUniPanel, because I have component properties for settings control colors, and I want to change this colors from code in runtime.

 

Marcin

 

 

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...