0
DevExpressコントロールを使用するC#WinFormsアプリケーションを開発中です。 Visibleプロパティをtrueに設定して、非表示のSimpleButtonを実行時に表示させることができない理由を理解しようとしています。私はコントロールのフォーカスを与えようとしました、コントロールをリフレッシュし、フォームを無駄にリフレッシュします。デバッガで気付いた点の1つは、ステートメントbtnAddJob.Visible = trueの後、Visibleプロパティがまだfalseであることです。何か案は?DevExpress SimpleButtonを実行時に表示する問題
public AddPredefinedJobsForm(WorkOrder workOrder)
: this()
{
currentWorkOrder = workOrder;
// Here I am just getting the position to display the button
btnAddJob.Location = new Point(btnNewJob.Location.X, btnNewJob.Location.Y);
// Hiding the button that my hidden button will replace below
btnNewJob.Visible = false;
// Give my hidden button focus
btnAddJob.Focus();
// Make my hidden button Visible
btnAddJob.Visible = true;
// Refresh the button
btnAddJob.Refresh();
// Refresh the entire form
this.Refresh();
}
ありがとうございます、私はそんな初心者です。それがトリックでした。このボタンは、私が経験していた動作を説明するgroupControlの中にありました。 – Grasshopper