예제 #1
0
 public void StartRenaming(int cursorPos, Control control)
 {
     if (m_textBox == null)
     {
         var area     = m_area();
         var indent   = CalculateIndent(area);
         var textArea = CalculateTextArea(area, indent);
         m_textBox      = new MyTextBox(control, () => new RectangleF(textArea.Location.Plus(ToControlTransform().OffsetX, ToControlTransform().OffsetY), textArea.Size), MyTextBox.InputFormEnum.FileName, null, x => new SimpleTextBoxBorderDrawer(x), 4, Fonts.Default);
         m_textBox.Text = PermanentText;
         m_textBox.SetCursorPosition(cursorPos);
         m_textBox.Colors.Background = Color.Transparent;
         m_textBox.Colors.BorderPen  = Pens.Transparent;
         MyTextBox.SetupCallbacks(control, m_textBox);
         m_textBox.GotFocus();
     }
 }