Bagikan melalui


ButtonBase.IsDefault Properti

Definisi

Mendapatkan atau mengatur nilai yang menunjukkan apakah kontrol tombol adalah tombol default.

protected:
 property bool IsDefault { bool get(); void set(bool value); };
protected public:
 property bool IsDefault { bool get(); void set(bool value); };
protected bool IsDefault { get; set; }
protected internal bool IsDefault { get; set; }
member this.IsDefault : bool with get, set
Protected Property IsDefault As Boolean
Protected Friend Property IsDefault As Boolean

Nilai Properti

true jika kontrol tombol adalah tombol default; jika tidak, false.

Keterangan

IsDefault Ketika properti diatur ke true, tombol adalah tombol default untuk Form. Ini berarti bahwa tombol diklik saat tombol ENTER ditekan jika tidak ada tombol lain atau kontrol lain yang menangkap tombol ENTER memiliki fokus.

Untuk menentukan tombol default formulir, atur AcceptButton properti formulir ke tombol yang diinginkan.

Berlaku untuk

Lihat juga