function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swathi JainSwathi Jain 

how to Hide Panel bar item

I have a vf page with the pannel bar 

<apex:page>

<apex:panelbar>

<apex:panelbaritem> item1 </apex:panelbaritem>

<apex:panelbaritem> item2 </apex:panelbaritem>

<apex:panelbaritem> item3 </apex:panelbaritem>

</apex:panelbar>

</apex:page>

When i reload the page 1 is open and 2 and 3 close 

but i need  all panel bar items are to be close .

I want to change the background color 

all these panel baritems are in green , i want to change these colors. 

Prad@SFDCPrad@SFDC

Hi,

 

You can use the class for color and display

 

<style>
.ChangeCOLOR
{
    background-color:blue;
    background-image:url("");
}
.rich-panelbar-content
{
display:none;
}
</style>

 

 

 

 

 <apex:panelBar >
      <apex:panelBarItem name="Item1" label="MyName"  id="Item1"  headerClass="ChangeCOLOR"></apex:panelBarItem>
       <apex:panelBarItem name="Item2" label="MyPass" id="Item2"  headerClass="ChangeCOLOR" ></apex:panelBarItem>
        <apex:panelBarItem name="Item3" label="MyWork" id="Item3"  headerClass="ChangeCOLOR"></apex:panelBarItem>
  </apex:panelBar>

 

If there is any issue then let me know .