1
パネルを含むユーザー定義コントロールを作成し、パネル内にラベルとテキストボックスを作成しました。さて、私の親のフォームには、フローレイアウトパネルがあります。私は、ユーザ定義のコントロールをflowlayoutパネルに追加しています。ここで親フォームのユーザー定義コントロールからコントロールの値を取得する方法
私は制御値を取得するために使用していますが、常に私がListBoxコントロールの値を確認与えているコードです:
// Here 'panel_Attribute' is my parent form panel to which I have added the controls
Control.ControlCollection listControls = panel_Attribute.Controls;
foreach (Control attributeControl in listControls)
{
if (attributeControl is Control)
{
log.Debug("attributeControl Values are attributeControl attributeControl.Name" +
attributeControl.Name + ", Value: " + attributeControl.Text);
attributeList.Add(((PHShowAttributeControl)attributeControl).
ProbeRawProjectTaskAttributeEvent);
//attributeList.Add(GetControlValues());
}
}
'(UserControlとしてWindow.Controls [x]).Control.Property'? –