编程实例 WebGroupBox(Aspx控件)
|
日期:2008年3月25日 作者: 查看:[大字体
中字体 小字体]
|
最近一直在学习.netWeb控件开发,以前在C/s中用习惯了GorupBox控件,在如今的Asp.Net中也想使用这样的现成控件,只不过一直以来没有找到;于是前几天就在想为何自己不写一个这样的控件来使用,今天完成了这个控件,贴出来和大家一起分享和学习。 详细代码如下: Code 1using System; 2using System.Collections.Generic; 3using System.ComponentModel; 4using System.Text; 5using System.Web; 6using System.Web.UI; 7using System.Web.UI.WebControls; 8 9namespace MyWebControls 10{ 11 [DefaultProperty("Text")] 12 [ToolboxData("<{0}:WebGroupBox runat=server>{0}:WEBGROUPBOX>")] 13 public class WebGroupBox : Panel 14 { 15 16 WebGruopBox 属性WebGruopBox 属性#region WebGruopBox 属性 17 /**//**//**//// 18 /// WebGroupBox 宽度 19 /// 20 [Bindable(true)] 21 [Category("WebGroupBox")] 22 [DefaultValue("")] 23 [Localizable(true)] 24 public override Unit Width 25 { 26 get 27 { 28 return base.Width; 29 } 30 set 31 { 32 base.Width = value; 33 } 34 } 35 36 [Bindable(false), Browsable(false), Category("WebGroupBox"), DefaultValue("")] 37 public override string GroupingText 38 { 39 get 40 { 41 return base.GroupingText; 42 } 43 set 44 { 45 base.GroupingText = value; 46 } 47 } 48 49 /**//**//**//// 50 /// WebGroupBox 高度 51 /// 52 [Bindable(true)] 53 [Category("WebGroupBox")] 54 [DefaultValue("")] 55 [Description("GroupBox 的宽")] 56 public override Unit Height 57 { 58 get 59 { 60 return base.Height; 61 } 62 set 63 { 64 base.Height = value; 65 } 66 } 67 68 private Align _GroupBoxAlign; 69 [Bindable(true)] 70 [Category("WebGroupBox")] 71 [DefaultValue("")] 72 [Localizable(true)] 73 public Align Align 74 { 75 get 76 { 77 return _GroupBoxAlign; 78 } 79 set 80 { 81 _GroupBoxAlign = value; 82 } 83 } 84 private WebGroupStyleColor _StyleColor; 85 [Bindable(true), Category("WebGroupBox"), DefaultValue("")] 86 public WebGroupStyleColor WebGroupBoxBorderColor 87 { 88 get 89 { 90 return _StyleColor; 91 } 92 set 93 { 94 _StyleColor = value; 95 } 96 } 97 98 /**//**//**//// 99 /// WebGroupBox FieldsetStyle样式 100 /// 101 private string _fieldsetstyle = "border: green 1px solid; padding: 4px 30px 10px 30px; margin-bottom: 8px; text-align: left"; 102 [Category("外观")] 103 [Bindable(true)] 104 [Description("Fieldset 样式")] 105 public string FieldsetStyle 106 { 107 get { return _fieldsetstyle; } 108 set { _fieldsetstyle = value; } 109 } 110 111 /**//**//**//// 112 /// WebGroupBox LegendStyle样式 113 /// 114 private string _legendstyle = "font-weight: bold; line-height: 45px"; 115 [Category("外观")] 116 [Bindable(true)]
上一篇:股票分析专家 同花顺2008功能概述
下一篇:下载:Firefox 3.0 Beta 5中文版
|
| 编程实例 WebGroupBox(Aspx控件) 相关文章: |
|
|
|
| 编程实例 WebGroupBox(Aspx控件) 相关软件: |
|
|
|