+2010-05-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ComboBox.cs: our internal textbox should show selection only if it
+ is enabled. Don't set HideSelection since it's preventing us
+ from correctly hide the selection when needed. Finally connect a
+ handler in case our parent ComboBox gets its Enabled state changed.
+ Fixes #600433.
+
2010-05-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* TreeView.cs: Set our internal fields related to the starting drag
if (textbox_ctrl != null) {
textbox_ctrl.SetSelectable (false);
- textbox_ctrl.ShowSelection = true;
+ textbox_ctrl.ShowSelection = Enabled;
textbox_ctrl.ActivateCaret (true);
textbox_ctrl.SelectAll ();
}
{
this.owner = owner;
ShowSelection = false;
- HideSelection = false;
+ owner.EnabledChanged += OwnerEnabledChangedHandler;
#if NET_2_0
owner.LostFocus += OwnerLostFocusHandler;
#endif
}
+ void OwnerEnabledChangedHandler (object o, EventArgs args)
+ {
+ ShowSelection = owner.Focused && owner.Enabled;
+ }
+
#if NET_2_0
void OwnerLostFocusHandler (object o, EventArgs args)
{