Results 1 to 4 of 4

Thread: [RESOLVED] Horizontal scroll bar in Listbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Resolved [RESOLVED] Horizontal scroll bar in Listbox

    Hi,

    I got a problem in horzontal scrollbar in listbox. For Asp.Net, i put the div and inside placed the scroll bar. I got the horizontal scroll bar. But in list box if it is large data, it is scrolled a list box, not scrolled list box inside data. I put the code here. Please suggest me. Hope your's reply.
    Code:
     <tr>
                                                            <td colspan="4">
                                                                <table style="overflow:auto;width:300px">
                                                                    <tr>
                                                                        <td class="datafield" align="center">
                                                                            <cc1:ListSearchExtender ID="ListSearchExtender2" runat="server" IsSorted="true" PromptCssClass="ListSearchExtenderPrompt"
                                                                                PromptPosition="Top" TargetControlID="lstProgramappliedFor">
                                                                            </cc1:ListSearchExtender>
                                                                             <div id="myContainer" style="height:140px;width:300px;overflow:scroll;" atomicselection="false">
                                                                          <asp:ListBox ID="lstProgramappliedFor" runat="server" Height="140" Width="300px"                                                                           onClick="window.status=this.options[this.selectedIndex].text" SelectionMode="Multiple" BorderStyle="Outset"></asp:ListBox>
                                                                           </div>
                                                                        </td>
                                                                        <td class="datafield" align="center" valign="middle" width="10%">
                                                                            <br>
                                                                            <asp:Button ID="btnadditem" runat="server" CssClass="btns" CausesValidation="false"
                                                                                Text="&gt;" Width="25px" OnClick="btnadditem_Click" OnClientClick="return FnValidateMaxSelection()"></asp:Button>
                                                                            
                                                                            <br>
                                                                            <asp:Button ID="btnremoveitem" runat="server" CssClass="btns" CausesValidation="false"
                                                                              OnClick="btnremoveitem_Click"  Text="&lt;" Width="25px"></asp:Button>
                                                                           
                                                                            <br>
                                                                            <asp:Button ID="btnremoveall" runat="server" CssClass="btns" CausesValidation="false"
                                                                              OnClick="btnremoveall_Click"  Text="&lt;&lt;" Width="25px"></asp:Button>
                                                                           
                                                                        </td>
                                                                        <td class="datafield" align="center">
                                                                            <asp:ListBox ID="lstSelectedProgramAppliedFor" runat="server" Width="300px" Height="140"
                                                                             onClick="window.status=this.options[this.selectedIndex].text"   SelectionMode="Multiple">
                                                                            </asp:ListBox>
                                                                        </td>
                                                                        <td class="datafield" align="center" width="10%">
                                                                            <asp:Button ID="btnColmoveup" runat="server" Text="^" Font-Size="13" CausesValidation="false"
                                                                             OnClick="btnColmoveup_Click" Width="25px"></asp:Button>
                                                                         
                                                                            <br>
                                                                            <asp:Button ID="btnColmovedwn" runat="server" Text="v" Font-Size="13" CausesValidation="false"
                                                                              OnClick="btnColmovedwn_Click"  Width="25px"></asp:Button>
                                                                            
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
    Code:
      protected override void Page_Load(object sender, EventArgs e)
            {
       if (!Page.IsPostBack)
                    {
                        int nItem = Convert.ToInt32(lstProgramappliedFor.Items.Count * 17);
    }
    }
    Thanks
    Failing to plan is Planning to fail

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Horizontal scroll bar in Listbox

    Can you show a screen shot of what you are referring to?

    Gary

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Re: Horizontal scroll bar in Listbox

    hi dude,

    I got it. I made a small mistake. Now it is solved.

    Thanks
    Failing to plan is Planning to fail

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width