[wx-dev] #9601: wxComboCtrl/wxTextCtrl->Disable does not. Indicators look disabled, but control accepts input.

wxTrac noreply at wxsite.net
Wed Jun 18 07:19:37 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9601>

#9601: wxComboCtrl/wxTextCtrl->Disable does not. Indicators look disabled, but
control accepts input.
---------------------------+------------------------------------------------
 Reporter:  hajokirchhoff  |       Owner:         
     Type:  defect         |      Status:  new    
 Priority:  normal         |   Milestone:         
Component:  GUI-all        |     Version:  2.9-svn
 Keywords:                 |   Blockedby:         
    Patch:  0              |    Blocking:         
---------------------------+------------------------------------------------
 wx-svn, MSVS2005
 The patch for the combo sample program demonstrates the problem.

 wxComboCtrl *cc;
 wxPanel *parent=cc->GetParent();

 parent->Disable();
 cc->Disable();
 parent->Enable();

 The last line, parent->Enable(), reenables the control (which it should
 not IMHO and did not in <=wx2.8).

 Worse, the control still looks disabled, but accepts input.

 Apply the patch to the sample program to reproduce.

 I found this problem with wxComboCtrl and wxTextCtrl, but it might apply
 to others.

 In general, when I disable a child and then enable a parent, the child
 should still be disabled. This is important, among other things, for XRC
 dialogs. I load an XRC panel into a disabled parent panel. I then enable
 the parent panel.
 With the new (wx2.9) code I loose all 'Enabled=0' settings from the XRC
 panel.
 This used to work.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9601>


More information about the wx-dev mailing list