Search code examples
salesforceapex-codevisualforce

Multiselect checkboxes List not displayed in window with scroll bar


I have a requirement where I want to display opportunity fields with checkboxes . I have done this using selectCheckBoxes but I am not able to display the contents in a small box in my Vf Page with Scroll bar as in the imageenter image description here But I am getting the list like below:enter image description here

sample code---

<apex:pageBlockSectionItem >
        <apex:outputPanel >
             <apex:outputLabel value="Choose the query fields below." ></apex:outputLabel>
             <apex:outputPanel >
                <apex:selectCheckboxes layout="pageDirection" value="{!getfieldname}" borderVisible="true" >
                   <apex:selectOptions value="{!listCustomFields}"></apex:selectOptions>
               </apex:selectCheckboxes>
             </apex:outputPanel>  
        </apex:outputPanel>

Can anyone help me for this?


Solution

  • Added style to the fieldset and now its as I wanted

    <style>
                fieldset{
                            height: 84px;
                            width: 181px;
                            overflow: auto;
                        }
        </style>