たとえば、メイン クラスの外部からコンボ ボックスからテキストにアクセスできるのはなぜでしょうか。しかし、アイテムを追加することはできません..コンボボックスの修飾子がパブリックに設定されています
public class ImageManager : mainFrame // Where my components are located
{
public ImageManager()
{
}
public void getText()
{
Console.WriteLine(comboBox.Text); //Will perfectly retrieve the text from it
}
public void setItem()
{
comboBox.Items.Add("Items"); //Does absolutely nothing and doesn't show error
}
}
手伝ってくれてありがとう !