CheckedListBox.SelectionMode プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As CheckedListBox Dim value As SelectionMode value = instance.SelectionMode instance.SelectionMode = value
public: virtual property SelectionMode SelectionMode { SelectionMode get () override; void set (SelectionMode value) override; }
/** @property */ public SelectionMode get_SelectionMode () /** @property */ public void set_SelectionMode (SelectionMode value)
public override function get SelectionMode () : SelectionMode public override function set SelectionMode (value : SelectionMode)
System.Windows.Forms.SelectionMode の One または None のいずれかの値。



CheckOnClick プロパティ、SelectionMode プロパティ、および ThreeDCheckBoxes プロパティを設定して CheckedListBox コントロールを初期化するコード例を次に示します。このコードは、CheckedListBox にコントロールを読み込み、DisplayMember にコントロールの Control.Name プロパティを設定します。
この例を実行するには、CheckedListBox1 という名前の CheckedListBox オブジェクトが配置されているフォームに次のコードを貼り付けて、フォームのコンストラクタまたは Load メソッドから InitializeCheckListBox メソッドを呼び出します。
// This method initializes CheckedListBox1 with a list of all // the controls on the form. It sets the selection mode // to single selection and allows selection with a single click. // It adds itself to the list before adding itself to the form. internal System.Windows.Forms.CheckedListBox CheckedListBox1; private void InitializeCheckedListBox() { this.CheckedListBox1 = new CheckedListBox(); this.CheckedListBox1.Location = new System.Drawing.Point(40, 90); this.CheckedListBox1.CheckOnClick = true; this.CheckedListBox1.Name = "CheckedListBox1"; this.CheckedListBox1.Size = new System.Drawing.Size(120, 94); this.CheckedListBox1.TabIndex = 1; this.CheckedListBox1.SelectionMode = SelectionMode.One; this.CheckedListBox1.ThreeDCheckBoxes = true; foreach ( Control aControl in this.Controls ) { this.CheckedListBox1.Items.Add(aControl, false); } this.CheckedListBox1.DisplayMember = "Name"; this.CheckedListBox1.Items.Add(CheckedListBox1); this.Controls.Add(this.CheckedListBox1); }
// This method initializes CheckedListBox1 with a list of all // the controls on the form. It sets the selection mode // to single selection and allows selection with a single click. // It adds itself to the list before adding itself to the form. internal: System::Windows::Forms::CheckedListBox^ CheckedListBox1; private: void InitializeCheckedListBox() { this->CheckedListBox1 = gcnew CheckedListBox; this->CheckedListBox1->Location = System::Drawing::Point( 40, 90 ); this->CheckedListBox1->CheckOnClick = true; this->CheckedListBox1->Name = "CheckedListBox1"; this->CheckedListBox1->Size = System::Drawing::Size( 120, 94 ); this->CheckedListBox1->TabIndex = 1; this->CheckedListBox1->SelectionMode = SelectionMode::One; this->CheckedListBox1->ThreeDCheckBoxes = true; System::Collections::IEnumerator^ myEnum = this->Controls->GetEnumerator(); while ( myEnum->MoveNext() ) { Control^ aControl = safe_cast<Control^>(myEnum->Current); this->CheckedListBox1->Items->Add( aControl, false ); } this->CheckedListBox1->DisplayMember = "Name"; this->CheckedListBox1->Items->Add( CheckedListBox1 ); this->Controls->Add( this->CheckedListBox1 ); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からCheckedListBox.SelectionMode プロパティを検索する場合は、下記のリンクをクリックしてください。

- CheckedListBox.SelectionMode プロパティのページへのリンク