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
kamal3883kamal3883 

horizenatal scroll bar in apex:selectlist

HI,

 

We try to implement horizontal scroll bar in apex: select.

 

  Issue: Horizontal size of multi select picklist is small. So we are not able to show full message. I am not able to add  any attachment.  

we have implemented following code.

 

<apex:selectList id="ifOfferGoal" label="Offer Goal"

                                    value="{!selectsOffer.offerGoal__c}" size="1"

                                    multiselect="false" style="width:205px">

                                    <apex:selectOptions value="{!offerGoal}" />

                                </apex:selectList>

 

Thanks

Kamaljit

Rahul SharmaRahul Sharma

It works using width.

Check this:

<apex:page >
    <apex:form >
        normal selectList : 
        <br/>
        <apex:selectList id="chooseColor">
            <apex:selectOption itemValue="1" itemLabel="1"/>
            <apex:selectOption itemValue="2" itemLabel="2"/>
            <apex:selectOption itemValue="3" itemLabel="3"/>
        </apex:selectList> 
        <br/>
        Wide selectList :
        <br/>
        <apex:selectList id="chooseColor1" style="width:205px">
            <apex:selectOption itemValue="1" itemLabel="1"/>
            <apex:selectOption itemValue="2" itemLabel="2"/>
            <apex:selectOption itemValue="3" itemLabel="3"/>
        </apex:selectList> 
    </apex:form>
</apex:page>

 

kamal3883kamal3883

Thanks for your solution. but it only increase size of list. i want somrthing like scroll barr or on mouse over if possible to implement.

Rahul SharmaRahul Sharma
So do you actually want to just increase the size of select list or also want to add a horizontal scroll bar to it?
kamal3883kamal3883

want to add scroll bar. either i want to add onmouseover or scroll bar