<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Visual_C%2B%2B_.NET%2FGUI_Form%2FCheckBoxListBox</id>
		<title>Visual C++ .NET/GUI Form/CheckBoxListBox - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Visual_C%2B%2B_.NET%2FGUI_Form%2FCheckBoxListBox"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Visual_C%2B%2B_.NET/GUI_Form/CheckBoxListBox&amp;action=history"/>
		<updated>2026-04-30T02:32:12Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Visual_C%2B%2B_.NET/GUI_Form/CheckBoxListBox&amp;diff=3816&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Visual_C%2B%2B_.NET/GUI_Form/CheckBoxListBox&amp;diff=3816&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Visual_C%2B%2B_.NET/GUI_Form/CheckBoxListBox&amp;diff=3817&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Visual_C%2B%2B_.NET/GUI_Form/CheckBoxListBox&amp;diff=3817&amp;oldid=prev"/>
				<updated>2010-05-26T12:06:11Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==ListBox and CheckBoxListBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
  using namespace System;&lt;br /&gt;
  using namespace System::ComponentModel;&lt;br /&gt;
  using namespace System::Collections;&lt;br /&gt;
  using namespace System::Windows::Forms;&lt;br /&gt;
  using namespace System::Data;&lt;br /&gt;
  using namespace System::Drawing;&lt;br /&gt;
  public ref class Form1 : public System::Windows::Forms::Form&lt;br /&gt;
  {&lt;br /&gt;
  public:&lt;br /&gt;
    Form1(void)&lt;br /&gt;
    {&lt;br /&gt;
      InitializeComponent();&lt;br /&gt;
            array&amp;lt;Object^&amp;gt;^ Items = gcnew array&amp;lt;Object^&amp;gt; { &lt;br /&gt;
                &amp;quot;Appleman&amp;quot;, &amp;quot;Challa&amp;quot;,    &amp;quot;Chand&amp;quot;,    &amp;quot;Cornell&amp;quot;,&lt;br /&gt;
                &amp;quot;Fraser&amp;quot;,   &amp;quot;Gunnerson&amp;quot;, &amp;quot;Harris&amp;quot;,   &amp;quot;Rammer&amp;quot;, &lt;br /&gt;
                &amp;quot;Symmonds&amp;quot;, &amp;quot;Thomsen&amp;quot;,   &amp;quot;Troelsen&amp;quot;, &amp;quot;Vaughn&amp;quot; &lt;br /&gt;
            };&lt;br /&gt;
            clBox-&amp;gt;Items-&amp;gt;AddRange(Items);&lt;br /&gt;
            lBox-&amp;gt;Items-&amp;gt;AddRange(Items);&lt;br /&gt;
            cBox = gcnew array&amp;lt;CheckBox^&amp;gt;(Items-&amp;gt;Length); &lt;br /&gt;
            &lt;br /&gt;
            int j = cBox-&amp;gt;Length/2;&lt;br /&gt;
            for (int i = 0; i &amp;lt; j; i++)&lt;br /&gt;
            {&lt;br /&gt;
                // Build Left Column&lt;br /&gt;
                cBox[i] = gcnew CheckBox();&lt;br /&gt;
                cBox[i]-&amp;gt;Location = Drawing::Point(50, 160+(30*i)); &lt;br /&gt;
                cBox[i]-&amp;gt;TabIndex = i+2; &lt;br /&gt;
                cBox[i]-&amp;gt;Text = Items[i]-&amp;gt;ToString(); &lt;br /&gt;
                cBox[i]-&amp;gt;CheckStateChanged += &lt;br /&gt;
                    gcnew EventHandler(this, &amp;amp;Form1::cBox_CheckStateChanged); &lt;br /&gt;
                &lt;br /&gt;
                // Build Right Column&lt;br /&gt;
                cBox[i+j] = gcnew CheckBox();&lt;br /&gt;
                cBox[i+j]-&amp;gt;Location = Drawing::Point(180, 160+(30*i)); &lt;br /&gt;
                cBox[i+j]-&amp;gt;TabIndex = i+j+2; &lt;br /&gt;
                cBox[i+j]-&amp;gt;Text = Items[i+j]-&amp;gt;ToString(); &lt;br /&gt;
                cBox[i+j]-&amp;gt;CheckStateChanged += &lt;br /&gt;
                    gcnew EventHandler(this, &amp;amp;Form1::cBox_CheckStateChanged); &lt;br /&gt;
            }&lt;br /&gt;
            // Add all CheckBoxes to Form&lt;br /&gt;
            Controls-&amp;gt;AddRange(cBox);&lt;br /&gt;
  }&lt;br /&gt;
  private:&lt;br /&gt;
        System::Windows::Forms::ListBox^  lBox;&lt;br /&gt;
        System::Windows::Forms::CheckedListBox^  clBox;&lt;br /&gt;
        array&amp;lt;CheckBox^&amp;gt;^ cBox; &lt;br /&gt;
    void InitializeComponent(void)&lt;br /&gt;
    {&lt;br /&gt;
      this-&amp;gt;lBox = (gcnew System::Windows::Forms::ListBox());&lt;br /&gt;
      this-&amp;gt;clBox = (gcnew System::Windows::Forms::CheckedListBox());&lt;br /&gt;
      this-&amp;gt;SuspendLayout();&lt;br /&gt;
      // &lt;br /&gt;
      // lBox&lt;br /&gt;
      // &lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;FormattingEnabled = true;&lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;Location = System::Drawing::Point(356, 32);&lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;Name = L&amp;quot;lBox&amp;quot;;&lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;Size = System::Drawing::Size(120, 264);&lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;TabIndex = 3;&lt;br /&gt;
      this-&amp;gt;lBox-&amp;gt;SelectedIndexChanged += gcnew System::EventHandler(this, &amp;amp;Form1::lBox_SelectedIndexChanged);&lt;br /&gt;
      // &lt;br /&gt;
      // clBox&lt;br /&gt;
      // &lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;FormattingEnabled = true;&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;Location = System::Drawing::Point(12, 32);&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;MultiColumn = true;&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;Name = L&amp;quot;clBox&amp;quot;;&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;Size = System::Drawing::Size(323, 79);&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;TabIndex = 2;&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;ThreeDCheckBoxes = true;&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;SelectedIndexChanged += gcnew System::EventHandler(this, &amp;amp;Form1::clBox_SelectedIndexChanged);&lt;br /&gt;
      this-&amp;gt;clBox-&amp;gt;ItemCheck += gcnew System::Windows::Forms::ItemCheckEventHandler(this, &amp;amp;Form1::clBox_ItemCheck);&lt;br /&gt;
      // &lt;br /&gt;
      // Form1&lt;br /&gt;
      // &lt;br /&gt;
      this-&amp;gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);&lt;br /&gt;
      this-&amp;gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;&lt;br /&gt;
      this-&amp;gt;ClientSize = System::Drawing::Size(494, 392);&lt;br /&gt;
      this-&amp;gt;Controls-&amp;gt;Add(this-&amp;gt;lBox);&lt;br /&gt;
      this-&amp;gt;Controls-&amp;gt;Add(this-&amp;gt;clBox);&lt;br /&gt;
      this-&amp;gt;Name = L&amp;quot;Form1&amp;quot;;&lt;br /&gt;
      this-&amp;gt;Text = L&amp;quot;Splitting The Check List Box&amp;quot;;&lt;br /&gt;
      this-&amp;gt;ResumeLayout(false);&lt;br /&gt;
    }&lt;br /&gt;
            System::Void clBox_ItemCheck(System::Object^ sender, &lt;br /&gt;
                                 System::Windows::Forms::ItemCheckEventArgs^ e)&lt;br /&gt;
        {&lt;br /&gt;
         // update state of CheckBox with same index as checked CheckedListBox&lt;br /&gt;
            cBox[e-&amp;gt;Index]-&amp;gt;CheckState = e-&amp;gt;NewValue; &lt;br /&gt;
        }&lt;br /&gt;
        System::Void clBox_SelectedIndexChanged(System::Object^ sender, &lt;br /&gt;
                                                System::EventArgs^ e)&lt;br /&gt;
        {&lt;br /&gt;
         // update ListBox with same selected item in the CheckedListBox&lt;br /&gt;
            lBox-&amp;gt;SelectedItem = clBox-&amp;gt;SelectedItem-&amp;gt;ToString(); &lt;br /&gt;
        }&lt;br /&gt;
        System::Void lBox_SelectedIndexChanged(System::Object^ sender, &lt;br /&gt;
                                               System::EventArgs^ e)&lt;br /&gt;
        {&lt;br /&gt;
         // update CheckedListBox with same selected item in the ListBox&lt;br /&gt;
            clBox-&amp;gt;SelectedItem = lBox-&amp;gt;SelectedItem; &lt;br /&gt;
        }&lt;br /&gt;
        void cBox_CheckStateChanged(Object^ sender, EventArgs^ e) &lt;br /&gt;
        {&lt;br /&gt;
         // update state of CheckedListBox with same index as checked CheckBox&lt;br /&gt;
            CheckBox^ cb = (CheckBox^)sender;&lt;br /&gt;
            clBox-&amp;gt;SetItemCheckState(Array::IndexOf(cBox, cb), cb-&amp;gt;CheckState);&lt;br /&gt;
        }&lt;br /&gt;
  };&lt;br /&gt;
[STAThreadAttribute]&lt;br /&gt;
int main(array&amp;lt;System::String ^&amp;gt; ^args)&lt;br /&gt;
{&lt;br /&gt;
  Application::Run(gcnew Form1());&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>