-
lovebondz said 1 year ago:
Is there any property that resizes the controls inside an inputpanel placed inside a splitter?
Also, I want the controls inside a group in my input panel control set to read-only and I can’t find an easy way to do that without writing out all the control’s name.I’ve tried something like this
c1_grptheme.inputpanel.readonly=true
but it sets all the inputpanel controls to read-only.
| # -
Hi,
> Is there any property that resizes the controls inside an inputpanel placed inside a splitter?
The controls inside the inputpanel use the special layout. They don’t spread to the whole width/height of the owner inputpanel (except the InputGroupHeader element). So, their size is independent of the owner panel’s size. In short, there is no such property.
> Also, I want the controls inside a group in my input panel control set to read-only
For example, take a look at the following code that updates the ReadOnly property for all controls within the given group:
using C1.Win.C1InputPanel; private void readOnlyCheckBox_CheckedChanged(object sender, EventArgs e) { // we obtain the required ReadOnly state from a CheckBox bool readOnly = readOnlyCheckBox.Checked; InputComponentCollection coll = c1InputPanel1.Items; // replace 'inputGroupHeader1′ with your group header element name int i = coll.IndexOf(inputGroupHeader1) + 1; // iterate through all controls in the group while (i < coll.Count && !(coll[ i ] is InputGroupHeader)) { InputComponent c = coll[ i ]; if (c is InputComboBox) ((InputComboBox)c).ReadOnly = readOnly; else if (c is InputDatePicker) ((InputDatePicker)c).ReadOnly = readOnly; else if (c is InputMaskedTextBox) ((InputMaskedTextBox)c).ReadOnly = readOnly; else if (c is InputDatePicker) ((InputDatePicker)c).ReadOnly = readOnly; else if (c is InputNumericBox) ((InputNumericBox)c).ReadOnly = readOnly; else if (c is InputTextBox) ((InputTextBox)c).ReadOnly = readOnly; else if (c is InputTimePicker) ((InputTimePicker)c).ReadOnly = readOnly; i++; } }Hope this will help.
Regards,
-Andrey
Answer| # -
lovebondz said 1 year ago:
Yes, it does work and it helped. Thanks.
| # -
lovebondz said 1 year ago:
Sorry for restarting this but is there any easy way to resize all the controls inside an input panel when the size of the input panel changes?
| # -
Hi,
Unfortunately, there is no easy way to achieve this using C1InputPanel, sorry.
Regards,
-Andrey
| # -
lovebondz said 1 year ago:
Thank you.
| #
You must be logged in to reply to this topic.

