Пример #1
0
 //確認 TextBoxDropDown 的 DropDownControl 一定會有值
 private Control getDropDownControl(Question q)
 {
     if (this.chkBox == null)
     {
         this.chkBox = new CheckedListBox();
         this.chkBox.CheckOnClick      = true;
         this.chkBox.Width             = 150;
         this.chkBox.Height            = 100;
         this.textBoxDropDownDecorator = new TextBoxDropDownDecorator(this.chkBox);
         foreach (QuestionListItem s in q.GetListItems())
         {
             this.chkBox.Items.Add(s.GetLabel());
         }
     }
     return(this.chkBox);
 }
Пример #2
0
 //確認 TextBoxDropDown 的 DropDownControl 一定會有值
 private Control getDropDownControl(Question q)
 {
     if (this.chkBox == null)
     {
         this.chkBox = new CheckedListBox();
         this.chkBox.CheckOnClick = true;
         this.chkBox.Width = 150;
         this.chkBox.Height = 100;
         this.textBoxDropDownDecorator = new TextBoxDropDownDecorator(this.chkBox);
         foreach (QuestionListItem s in q.GetListItems())
         {
             this.chkBox.Items.Add(s.GetLabel());
         }
     }
     return this.chkBox;
 }