Exemplo n.º 1
0
 private void EditShow()
 {
     if (m_textBox == null)
     {
         m_textBox = new ILTextBoxAutoHide();
         if (Parent != null)
         {
             Parent.Controls.Add(m_textBox);
         }
         m_textBox.Committing += new EventHandler(m_textBox_Committing);
     }
     m_textBox.Text = m_text;
     if (m_orientation == TextOrientation.Horizontal)
     {
         m_textBox.Size = Size;
         m_textBox.Left = Location.X;
         m_textBox.Top  = Top + (Height - m_textBox.Height) / 2;
     }
     else
     {
         if (Parent != null)
         {
             m_textBox.Top    = Parent.Padding.Top;
             m_textBox.Left   = Parent.Padding.Left;
             m_textBox.Width  = Parent.Width - Parent.Padding.Horizontal;
             m_textBox.Height = Parent.Height - Parent.Padding.Vertical;
         }
     }
     m_textBox.Font = Font;
     m_textBox.Show();
     m_textBox.BringToFront();
     m_textBox.Focus();
     m_textBox.SelectAll();
 }
Exemplo n.º 2
0
 private void EditShow() {
     if (m_textBox == null) {
         m_textBox = new ILTextBoxAutoHide(); 
         if (Parent != null) 
             Parent.Controls.Add(m_textBox);
         m_textBox.Committing += new EventHandler(m_textBox_Committing);
     }
     m_textBox.Text = m_text; 
     if (m_orientation == TextOrientation.Horizontal) {
         m_textBox.Size = Size; 
         m_textBox.Left = Location.X;
         m_textBox.Top = Top + (Height - m_textBox.Height) / 2; 
     } else {
         if (Parent != null) {
             m_textBox.Top = Parent.Padding.Top; 
             m_textBox.Left = Parent.Padding.Left; 
             m_textBox.Width = Parent.Width - Parent.Padding.Horizontal; 
             m_textBox.Height = Parent.Height - Parent.Padding.Vertical; 
         }
     }
     m_textBox.Font = Font; 
     m_textBox.Show(); 
     m_textBox.BringToFront(); 
     m_textBox.Focus();
     m_textBox.SelectAll(); 
 }