2012-09-12 141 views
0

在ajax網站上有一個關於自動完成的例子(有link),它的滑動條很好。這裏是代碼:Ajax自動完成滾動問題

<ajaxToolkit:AutoCompleteExtender 
    runat="server" 
    ID="autoComplete1" 
    TargetControlID="myTextBox" 
    ServiceMethod="GetCompletionList" 
    ServicePath="AutoComplete.asmx" 
    MinimumPrefixLength="2" 
    CompletionInterval="1000" 
    EnableCaching="true" 
    CompletionSetCount="20" 
    CompletionListCssClass="autocomplete_completionListElement" 
    CompletionListItemCssClass="autocomplete_listItem" 
    CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" 
    DelimiterCharacters=";, :" 
    ShowOnlyCurrentWordInCompletionListItem="true"> 
     <Animations> 
      <OnShow> ... </OnShow> 
      <OnHide> ... </OnHide> 
     </Animations> 
</ajaxToolkit:AutoCompleteExtender> 

但是,當我嘗試使用它的代碼我得到這樣樣的結果(無滑塊和糟糕的看法)

my problem

缺什麼在我的代碼?

回答

0

根據您的需要,在Css類中嘗試使用Css高度,最小高度或最大高度。 它會在列表右側添加滾動條。寬度也可以用來控制寬度。

不要忘記設置溢出:auto;