做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

如何為CheckBoxList和RadioButtonList添加滾動條

來源:懂視網 責編:小采 時間:2020-11-27 22:36:55
文檔

如何為CheckBoxList和RadioButtonList添加滾動條

如何為CheckBoxList和RadioButtonList添加滾動條:如何給CheckBoxList和RadioButtonList添加滾動條? 繼承基類CheckBoxList和RadioButtonList,添加滾動屬性,重寫Render方法即可。 屬性列表: #region 滾動控制 private bool _ShowScrollBar = false; /// <su
推薦度:
導讀如何為CheckBoxList和RadioButtonList添加滾動條:如何給CheckBoxList和RadioButtonList添加滾動條? 繼承基類CheckBoxList和RadioButtonList,添加滾動屬性,重寫Render方法即可。 屬性列表: #region 滾動控制 private bool _ShowScrollBar = false; /// <su

如何給CheckBoxList和RadioButtonList添加滾動條?
繼承基類CheckBoxList和RadioButtonList,添加滾動屬性,重寫Render方法即可。
屬性列表:

#region 滾動控制
 private bool _ShowScrollBar = false;
 /// <summary>
 /// 顯示滾動條
 /// </summary>
 [
 System.ComponentModel.Description("是否顯示顯示滾動條")
 , System.ComponentModel.DefaultValue(false)
 , System.ComponentModel.Category("滾動條設置")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public bool ShowScrollBar
 {
 get { return _ShowScrollBar; }
 set { _ShowScrollBar = value; }
 }
 private Overflow _OverflowY = Overflow.auto;
 /// <summary>
 /// 豎直滾動條
 /// </summary>
 [
 System.ComponentModel.Description("豎直滾動條")
 , System.ComponentModel.DefaultValue(Overflow.auto)
 , System.ComponentModel.Category("滾動條設置")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public Overflow OverflowY
 {
 get { return _OverflowY; }
 set { _OverflowY = value; }
 }
 private Overflow _OverflowX = Overflow.auto;
 /// <summary>
 /// 水平滾動條
 /// </summary>
 [
 System.ComponentModel.Description("水平滾動條")
 , System.ComponentModel.DefaultValue(Overflow.auto)
 , System.ComponentModel.Category("滾動條設置")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public Overflow OverflowX
 {
 get { return _OverflowX; }
 set { _OverflowX = value; }
 }
 private Unit _ScrollHeight = Unit.Parse("0px");
 /// <summary>
 /// 滾動高度
 /// </summary>
 [
 System.ComponentModel.Description("滾動高度")
 , System.ComponentModel.Category("滾動條設置")
 , DefaultValue("0px")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public Unit ScrollHeight
 {
 get { return _ScrollHeight; }
 set { _ScrollHeight = value; }
 }
 private Unit _ScrollWidth = Unit.Parse("0px");
 /// <summary>
 /// 滾動寬度
 /// </summary>
 [
 System.ComponentModel.Description("滾動寬度")
 , System.ComponentModel.Category("滾動條設置")
 , DefaultValue("0px")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public Unit ScrollWidth
 {
 get { return _ScrollWidth; }
 set { _ScrollWidth = value; }
 }
 private string _ScrollCssClass = "";
 /// <summary>
 /// 滾動樣式設置
 /// </summary>
 [
 System.ComponentModel.Description("滾動樣式設置")
 , System.ComponentModel.Category("滾動條設置")
 , System.ComponentModel.DefaultValue("")
 , System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)
 ]
 public string ScrollCssClass
 {
 get { return _ScrollCssClass; }
 set { _ScrollCssClass = value; }
 }

 #region 書寫標簽
 void WriteBeginSpan(HtmlTextWriter writer)
 {
 if (this._ShowScrollBar)
 {
 StringBuilder strSpan = new StringBuilder();
 strSpan.Append("<span ");
 strSpan.Append(string.Format("style='overflow-y:{0};overflow-x:{1};",
 System.Enum.GetName(typeof(Overflow), this._OverflowY),
 System.Enum.GetName(typeof(Overflow), this._OverflowX)));
 if (this._ScrollHeight.ToString() != "0px")
 {
 strSpan.Append(string.Format("height:{0};", this._ScrollHeight));
 }
 if (this._ScrollWidth.ToString() != "0px")
 {
 strSpan.Append(string.Format("width:{0};", this._ScrollWidth));
 }
 strSpan.Append("';");
 if (!string.IsNullOrEmpty(_ScrollCssClass))
 {
 strSpan.Append(string.Format(" class='{0}'", _ScrollCssClass));
 }
 strSpan.Append(">");
 writer.Write(strSpan.ToString());
 }
 }
 void WriteEndSpan(HtmlTextWriter writer)
 {
 if (this._ShowScrollBar)
 {
 writer.Write("</span>");
 }
 }
 #endregion
 #endregion

重寫Render方法: 

 protected override void Render(HtmlTextWriter writer)
 {
 this.WriteBeginSpan(writer);
 base.Render(writer);
 this.WriteEndSpan(writer);
 } 

就這樣就可以了。
還要定義一個枚舉:

public enum Overflow
 {
 auto = 0,
 hidden = 1,
 scroll = 2,
 visible = 3,
 inherit = 4
 }

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

如何為CheckBoxList和RadioButtonList添加滾動條

如何為CheckBoxList和RadioButtonList添加滾動條:如何給CheckBoxList和RadioButtonList添加滾動條? 繼承基類CheckBoxList和RadioButtonList,添加滾動屬性,重寫Render方法即可。 屬性列表: #region 滾動控制 private bool _ShowScrollBar = false; /// <su
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 广丰县| 茌平县| 阳谷县| 绩溪县| 太谷县| 昌宁县| 文登市| 项城市| 光山县| 武乡县| 安龙县| 内黄县| 镇平县| 房产| 灵山县| 陵川县| 沙坪坝区| 阜平县| 久治县| 永定县| 洮南市| 平谷区| 扎囊县| 蒙山县| 定南县| 安国市| 濮阳市| 丹阳市| 辛集市| 丹棱县| 宁阳县| 宁陕县| 泰安市| 横山县| 南康市| 新宾| 石门县| 云和县| 金塔县| 莱州市| 台北市|