def DublicateLogic(form):
	form.choosers.append(form.logicChooser1)
	#remove the placeholder controls created in __init__
	form.tabPageLogic.Controls.Remove(form.logicChooser1);
	form.tabPageLogic.Controls.Remove(form.labelPatternRate);
	#for each row in the logic choosers
	for i in range(0, form.MaxPattern):
		offset = 22;
		lc = LogicChooser();
		lc.Top = form.logicChooser1.Top + i * offset;
		lc.Left = form.logicChooser1.Left;
		lc.Visible = True;
		lc.TabIndex = form.logicChooser1.TabIndex + 20 * i;
		lc.Name = form.logicChooser1.Name + str(i);
		form.choosers.append(lc)
		#for each button for the channel selectors
		for j in range(0,form.MaxPattern):
			form.choosers[i].Controls[j].Top = form.logicChooser1.Top + i * offset;
			form.choosers[i].Controls[j].Left += form.logicChooser1.Left;
			form.tabPageLogic.Controls.Add(form.choosers[i].Controls[j]);
		l=Label();
		#form.DublicateControl(l, form.labelPatternRate, i, offset);
		DublicateControl(l, form.labelPatternRate, i, offset);
		l.TextAlign = form.labelPatternRate.TextAlign;
		form.patternRateLabels[1+i] = l;
		form.tabPageLogic.Controls.Add(l);
示例#2
0
   def __build_skip_label(self, skipped_n):
      ''' 
      Builds and returns the 'number skipped' Label for this form.
      'skipped_n' -> the number of books that were skipped. 
      '''

      label = Label()
      label.UseMnemonic = False
      label.Location = Point(10, 30) 
      label.Size = Size(280, 13)
      label.TextAlign = ContentAlignment.MiddleCenter
      label.Text = i18n.get("FinishFormSkippedSingle") if skipped_n==1 else \
         i18n.get("FinishFormSkippedPlural").format(skipped_n)
      return label
示例#3
0
    def __build_skip_label(self, skipped_n):
        ''' 
      Builds and returns the 'number skipped' Label for this form.
      'skipped_n' -> the number of books that were skipped. 
      '''

        label = Label()
        label.UseMnemonic = False
        label.Location = Point(10, 30)
        label.Size = Size(280, 13)
        label.TextAlign = ContentAlignment.MiddleCenter
        label.Text = i18n.get("FinishFormSkippedSingle") if skipped_n==1 else \
           i18n.get("FinishFormSkippedPlural").format(skipped_n)
        return label