更新时间:2021-06-28 07:54:08
我不会那样做.我将TextBox
放在窗体上,然后将其隐藏直到需要为止(当用户单击button1时).更好的是,我将其放在表单上并只是将其禁用.当新控件出现在无处不在"且出于未知原因时,用户不喜欢它.
除此之外,您的问题还不清楚.您是什么意思我不知道应该在那里"?
I wouldn''t do it that way. I''d put theTextBox
on the form, and then hide it until it''s needed (when the user clicks button1). Even better, I''d put it on the form and just disable it. Users don''t like it when new controls appear "out of nowhere" and for unknown reasons.
Beyond that, your question is unclear. What do you mean by "I don''t think I know what should be there"?
问题是您正在尝试对自身进行myNewtextbox
(第二行)在您的方法中).您需要添加到其他Control
中,通常是Panel
或Form
.—SA
The problem is that you''re trying tomyNewtextbox
to itself (in second line inside your method). You need to added to some otherControl
, typically aPanel
or aForm
.—SA