当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.Select方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.TextBox.Select方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.Select方法的具体用法?C# TextBox.Select怎么用?C# TextBox.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.TextBox的用法示例。


在下文中一共展示了TextBox.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateChildControls

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            _ctrlWrappers = new Panel {ID = "wrp", CssClass = "controlWrappers"};
            _ctrlWrappers.Style[Styles.opacity] = "0.3";
            Controls.Add(_ctrlWrappers);

            BehaviorUnveiler unveiler = new BehaviorUnveiler {ID = "unveiler"};
            _ctrlWrappers.Controls.Add(unveiler);

            _filterWrapper = new Panel {ID = "fltW", DefaultWidget = "fltB"};

            _filter = new TextBox {ID = "flt", CssClass = "filter"};

            _fltBtn = new Button {ID = "fltB"};
            _fltBtn.Style[Styles.marginLeft] = "-1000px";
            _fltBtn.Click += 
                delegate
                {
                    // Making sure we select all "filter text" to mak it easy to "re-filter"...
                    _filter.Focus();
                    _filter.Select();

                    // Checking for dead keys...
                    if (OldFilter != _filter.Text)
                    {
                        CurrentPage = 0;
                        DataBindGrid();
                        _lstWrappers.ReRender();
                        _lstWrappers.Style[Styles.display] = "none";
                        new EffectFadeIn(_lstWrappers, 200)
                            .Render();
                        OldFilter = _filter.Text;
                    }
                };
            _filterWrapper.Controls.Add(_filter);
            _filterWrapper.Controls.Add(_fltBtn);
            _ctrlWrappers.Controls.Add(_filterWrapper);

            _previous = new LinkButton {ID = "prev", Text = " ", CssClass = "previous"};
            _previous.Text = "<<";
            _previous.Click +=
                delegate
                {
                    if (CurrentPage != 0)
                    {
                        CurrentPage -= 1;
                        DataBindGrid();
                        _lstWrappers.ReRender();
                        new EffectRollUp(_lstWrappers, 200)
                            .ChainThese(
                                new EffectFadeIn(_lstWrappers, 200))
                            .Render();
                    }
                };
            _ctrlWrappers.Controls.Add(_previous);

            _count = new Label {ID = "cnt", CssClass = "count"};
            _ctrlWrappers.Controls.Add(_count);

            _next = new LinkButton {ID = "next", Text = " ", CssClass = "next"};
            _next.Text = ">>";
            _next.Click +=
                delegate
                {
                    if ((CurrentPage + 1) * PageSize < DataSource["Rows"].Count)
                    {
                        CurrentPage += 1;
                        DataBindGrid();
                        _lstWrappers.ReRender();
                        new EffectRollUp(_lstWrappers, 200)
                            .ChainThese(
                                new EffectFadeIn(_lstWrappers, 200))
                            .Render();
                    }
                };
            _ctrlWrappers.Controls.Add(_next);

            _lstWrappers = new Panel {ID = "lstWrp", CssClass = "gridWrapper"};
            Controls.Add(_lstWrappers);
        }
开发者ID:greaterwinner,项目名称:ra-brix,代码行数:82,代码来源:Grid.cs


注:本文中的System.Web.UI.WebControls.TextBox.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。