Files
mirror-processhacker/trunk/TreeViewAdv/Tree/NodeControls/NodeIntegerTextBox.cs
T
wj32 3a5a6818ee add TreeViewAdv code
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@339 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2008-12-19 23:19:42 +00:00

38 lines
837 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;
namespace Aga.Controls.Tree.NodeControls
{
public class NodeIntegerTextBox : NodeTextBox
{
private bool _allowNegativeSign = true;
[DefaultValue(true)]
public bool AllowNegativeSign
{
get { return _allowNegativeSign; }
set { _allowNegativeSign = value; }
}
public NodeIntegerTextBox()
{
}
protected override TextBox CreateTextBox()
{
NumericTextBox textBox = new NumericTextBox();
textBox.AllowDecimalSeperator = false;
textBox.AllowNegativeSign = AllowNegativeSign;
return textBox;
}
protected override void DoApplyChanges(TreeNodeAdv node, Control editor)
{
SetValue(node, (editor as NumericTextBox).IntValue);
}
}
}