|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Cx.Attributes;
using Cx.EventArgs;
using Cx.Interfaces;
using Cx.WinForm;
namespace Cx.Designer.Components
{
[CxComponentName("CxTextBox")]
[CxExplicitEvent("TextSet")]
public partial class CxTextBox : UserControl, ICxVisualComponentClass
{
[CxComponentProperty]
public string Label
{
get { return lblLabel.Text; }
set { lblLabel.Text = value; }
}
public CxTextBox()
{
InitializeComponent();
EventHelpers.Transform(this, tbText, "LostFocus", "Text").To("TextSet");
}
[CxConsumer]
public void OnEnableState(object sender, CxEventArgs<bool> args)
{
Enabled = args.Data;
}
public void Register(object form, ICxVisualComponent comp)
{
this.RegisterControl((Form)form, comp);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.