* FormTest.cs: make sure Form.ImeMode is NoControl by default.
* ButtonTest.cs: add a unit test for Button.DefaultImeMode.
2006-12-06 Chris Toshok <toshok@ximian.com>
In System.Windows.Forms:
* Form.cs: we don't need to explicitly set ImeMode to
ImeMode.NoControl - that's a natural fallout of Control.ImeMode's
behavior in the face of ImeMode.Inherit.
* ButtonBase.cs: change DefaultImeMode to ImeMode.Disable, and
change the ctor's assignment to use ImeMode instead of ime_mode.
* Control.cs (get_ImeMode): don't assume DefaultImeMode ==
ImeModeInherit. Only check for the parent's imemode (and return
NoControl if there is no parent) if ime_Mode == ImeMode.Inherit.
This fixes the button unit test, which sets both ImeMode and
DefaultImeMode to ImeMode.Disable.
also make the ime_mode field private.
2006-12-06 Chris Toshok <toshok@ximian.com>
svn path=/trunk/mcs/; revision=69148
image = null;
image_list = null;
image_alignment = ContentAlignment.MiddleCenter;
- ime_mode = ImeMode.Disable;
+ ImeMode = ImeMode.Disable;
text_alignment = ContentAlignment.MiddleCenter;
is_default = false;
is_pressed = false;
[Browsable(false)]
[EditorBrowsable (EditorBrowsableState.Never)]
public new ImeMode ImeMode {
- get {
- return base.ImeMode;
- }
-
- set {
- base.ImeMode = value;
- }
+ get { return base.ImeMode; }
+ set { base.ImeMode = value; }
}
[Localizable(true)]
}
protected override ImeMode DefaultImeMode {
- get {
- return ImeMode.Inherit;
- }
+ get { return ImeMode.Disable; }
}
protected override Size DefaultSize {
+2006-12-06 Chris Toshok <toshok@ximian.com>
+
+ * Form.cs: we don't need to explicitly set ImeMode to
+ ImeMode.NoControl - that's a natural fallout of Control.ImeMode's
+ behavior in the face of ImeMode.Inherit.
+
+ * ButtonBase.cs: change DefaultImeMode to ImeMode.Disable, and
+ change the ctor's assignment to use ImeMode instead of ime_mode.
+
+ * Control.cs (get_ImeMode): don't assume DefaultImeMode ==
+ ImeModeInherit. Only check for the parent's imemode (and return
+ NoControl if there is no parent) if ime_Mode == ImeMode.Inherit.
+ This fixes the button unit test, which sets both ImeMode and
+ DefaultImeMode to ImeMode.Disable.
+
+ also make the ime_mode field private.
+
2006-12-06 Chris Toshok <toshok@ximian.com>
* Control.cs: make control_style private.
Size client_size; // size of the client area (window excluding decorations)
Rectangle client_rect; // rectangle with the client area (window excluding decorations)
ControlStyles control_style; // rather win32-specific, style bits for control
- internal ImeMode ime_mode = ImeMode.Inherit;
+ ImeMode ime_mode;
bool layout_pending; // true if our parent needs to re-layout us
object control_tag; // object that contains data about our control
internal int mouse_clicks; // Counter for mouse clicks
dist_top = 0;
dist_bottom = 0;
tab_stop = true;
+ ime_mode = ImeMode.Inherit;
#if NET_2_0
use_compatible_text_rendering = Application.use_compatible_text_rendering;
[MWFCategory("Behavior")]
public ImeMode ImeMode {
get {
- if (ime_mode == DefaultImeMode) {
+ if (ime_mode == ImeMode.Inherit) {
if (parent != null)
return parent.ImeMode;
else
return ImeMode.NoControl; // default value
- }
+ }
return ime_mode;
}
maximize_box = true;
help_button = false;
show_in_taskbar = true;
- ime_mode = ImeMode.NoControl;
is_visible = false;
is_toplevel = true;
size_grip_style = SizeGripStyle.Auto;
Assert.AreEqual (16, B1.ImageList.ImageSize.Width, "#3g");
}
+
[Test]
public void IMeModeTest ()
{
[TestFixture]
public class ButtonInheritorTest : Button {
+ [Test]
+ public void DefaultImeModeTest ()
+ {
+ Assert.AreEqual (ImeMode.Disable, DefaultImeMode, "1");
+ }
+
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void Constructor_Null ()
+2006-12-06 Chris Toshok <toshok@ximian.com>
+
+ * FormTest.cs: make sure Form.ImeMode is NoControl by default.
+
+ * ButtonTest.cs: add a unit test for Button.DefaultImeMode.
+
2006-12-06 Chris Toshok <toshok@ximian.com>
* RadioButtonTest.cs: add a couple of test involving TabStop.
Assert.IsFalse (myform.TopMost, "#36");
Assert.AreEqual (Color.Empty, myform.TransparencyKey, "#37");
Assert.AreEqual (FormWindowState.Normal, myform.WindowState, "#38");
+ Assert.AreEqual (ImeMode.NoControl, myform.ImeMode, "#39");
myform.Dispose ();
}