c# - winforms&Infragistic controls readonly property does not work for clicked control -
I wrote this code to make all the rules read only
MakeReadOnly (Control Control, bool bIsReadOnly) {for (int i = 0; i & lt; control.Controls.Count; i ++) {if (control.Controls [i] .control.ft> 0) {makeReadOnly (Control.Controls [i], bIsReadOnly); } And if (Controls Control [i] .GetType () == Type (UltraTextEditor)) {(Control.Controls [i] as UltraTextEditor) .ReadOnly = bIsReadOnly; } And if (control control [i]. Gate type () == type (ultra numeric editor)) {(control. [I] as ultra anumaric editor) .Redonly = Bis readonly; } And if (Controls Control [i] .GetType () == Type (ListBox)) {(Control.Controls [i] as ListBox) Enable =! BIsReadOnly; }}} This works but if the user clicks on a control box like a control box, then click on the edit button (call the makeReadOnly function). The function for the clicked textbox does not work (it works for other controls).
Private Zero editButton_Click () {foreach (control in this control) {makeReadOnly (control, wrong); }} "This" displays the parent form. Why does not this work to click the "EditButton_Click ()" button event? How do I solve this problem?
I think I got the answer. The problem is the interface when the user has installed an ultrotext editor or ultraconfo editor, the infographic changes its type like "unforgettable UITText ..." and its original type becomes ultradext editor or ultraconfo editor, so I have to check this type of To solve this, parents have to control the types.
Comments
Post a Comment